Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
This is my requirement.
Earlier:
We used to show whatever is there in the Level05 as MappingCode in the Dimension of a chart.
Now:
I would like to show the last value in between the levels(Level01-Level05).
Level01 | Level02 | Level03 | Level04 | Level05 | MappingCode |
X1 | X2 | X3 | X4 | X5 | X5 |
Y1 | Y2 | Y3 | Y4 | Y4 | |
Z1 | Z2 | Z3 | Z3 | ||
A1 | A1 | ||||
B1 | B2 | B2 |
For Example,
if the value in the Level05(Refer row=1) is X5 that should be considered as MappingCode.
For the 2nd row as Level05 is NULL we will consider Y4 as the MappingCode.
For the 3rd row as we dont have any values in the Level05 and Level04 we will consider Z3 as MappingCode which is there in Level03.
For the 4th row as we dont have any value from Level02-Level05 we will consider A1 as the value for MappingCode.
For the 5th row as dont have value for Level03-Level05 we will consider B2 as the value for MappingCode.
Please let me know how can manage this in the dimension of a chart.
Thanks in advance!
May be try this
Pick(5 + (IsNull(Level01) + IsNull(Level02) + IsNull(Level03) + IsNull(Level04) + IsNull(Level05)), Level01, Level02, Level03, Level04, Level05)
if(len(Level05) <> 0,
Level05,
if len(Level04) <> 0,
Level04,
if(Len(Level03) <> 0,
Level03,
if(Len(Level02) <> 0,
Level02,
Level01
)
)
)
)
embedded into your ApplyMap statement