Extracting Specific dimensions/values from multidimensional array
Say I have sales data
ie 5 sales, on day 1, in year one, in currency x of a code "a".
what i want to do is be able to do is to convert all the currencies to
one currency and display the data by different codes.
i thought about using a 4 dimensional array, ie(code,ccy,year,day) and
inserting individual sales for each of the data points.
Day
code ccy Year 1 2
a x 1 5 20
a x 2 10
a y 1 5 20
a y 2 10
b x 1 5 20
b x 2 10
b y 1 5 20
b y 2 10
Once i have inserted this data into such an array, how do i extract
say all of the data for just code a for example?
in practice the number or currency for each code will be different,
and the number of codes will be different, but the number of years and
days will be the same for each code-ccy combination
(Context - Actuarial - this is a runoff/delay triangle)
Any help most appreciated!
|