Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
JuMo
Creator
Creator

Using a string to get a measure name

Hello

 

I have a series of measure that have the following format

KPI_A.Monthly

KPI_A.Target

KPI_A.Accumulative

KPI_A.EOY

KPI_B.Monthly

KPI_B.Target

KPI_B.Accumulative

KPI_B.EOY

KPI_C.Monthly

… etc …

 

I also have a table with the root name of the measures

KPI_Key

KPI_A

KPI_B

KPI_C

 

1) 1st Method

If I inject this table inside a variable (KPI_Analyzed_Key), I can (with a drop-down selector) select a KPI_Analyzed_Key and then display all the associated measure using this expression:

[$(KPI_Analyzed_Key).Monthly]

And it works perfectly, I’ve got the monthly value for the selected KPI

 

2) 2nd Method

Using the same approach, I want to display all my measure in the same table… I would like to have something like that

 

KPI_Key              Monthly              Target   Accumulative    EOY
KPI_A                          
KPI_B                         
KPI_C                          

 

However, I cannot manage to get it …

I’ve tried to duplicate the same formula as previously:

[$(KPI _Key).Monthly]

but its not working.

Any clue ?

Labels (4)
21 Replies
Kushal_Chawda

@JuMo  You are trying to evaluate multiple master measure for each value of KPI which is not possible as measure is evaluated once for each value. If you want to evaluate different measure for each dimension value you will need something like pick (match(

With KPI_key as dimension you can create below measures.

Monthly: //Measure 1
=pick(Match(KPI_key,'KPI_A','KPI_B','KPI_C'),
[KPI_A.Monthly],[KPI_B.Monthly],[KPI_C.Monthly])

Target: // Measure 2
=pick(Match(KPI_key,'KPI_A','KPI_B','KPI_C'),
[KPI_A.Target],[KPI_B.Target],[KPI_C.Target])

EOY: //Measure 3
=pick(Match(KPI_key,'KPI_A','KPI_B','KPI_C'),
[KPI_A.EOY],[KPI_B.EOY],[KPI_C.EOY])
JuMo
Creator
Creator
Author

Many many thanks @Kushal_Chawda that works perfectly.

And a huge thank-you to everybody in this thread, your comments have been so constructive for me !