Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewforum
Creator II
Creator II

How to get this value in dimension of a chart

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).

Level01Level02Level03Level04Level05MappingCode
X1X2X3X4X5X5
Y1Y2Y3Y4 Y4
Z1Z2Z3 Z3
A1 A1
B1B2 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!

2 Replies
CELAMBARASAN
Partner
Partner

May be try this

Pick(5 + (IsNull(Level01) + IsNull(Level02) + IsNull(Level03) + IsNull(Level04) + IsNull(Level05)), Level01, Level02, Level03, Level04, Level05)

Roop
Specialist
Specialist

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