Hi,
I am trying to write a KPI measure in Qlik sense using both alternate states and set analysis.
My measure is:
COUNT(DISTINCT {$<CONSENSE = {'OK'},CCONTRACT = {'$(v_Contract)'}>} COD)
how can I insert the alternate state "Group 1" in the measure? Nothing seams to work with set analysis.
Thanks in advance,
G.
If you want the selection CONSENSE = {'OK'},CCONTRACT = {'$(v_Contract)'} applied on [Group 1] you should use
COUNT(DISTINCT {[Group 1]<CONSENSE = {'OK'},CCONTRACT = {'$(v_Contract)'}>} COD)
Also, check which state the object itself belongs to (under the object properties).
I tried but it not working, it's giving me 0 all the time.
COUNT(DISTINCT {[Group 1]<CONSENSE = {'OK'},CCONTRACT = {'$(v_Contract)'}>} COD)
It should also work if you make sure that the object belongs to the [Group 1] state (which you set under Object properties --> Appearance --> Alternate states) and omit the set identifier from the expression:
COUNT(DISTINCT {<CONSENSE = {'OK'},CCONTRACT = {'$(v_Contract)'}>} COD)
I checked and the alternate set is perfectly set, but still not working.
Then you must have some other error. Check spelling (Is the field name really "CCONTRACT"?), check that the variable has a value, etc.