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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
NickHoff
Specialist
Specialist

Alternate State Variable in Set Analysis

I have a simple expression like the following, but it doesn't work.


SUM({Benchmark<ProcGroup= {"$(eProcedureGroup)"}>}BMHCA1PCT)


The variable eProcedureGroup is created @ script load with the following:  SET eProcedureGroup = 'GetFieldSelections(ProcGroup)';


I've tried the following as well:


SET eProcedureGroup = 'chr(34)&GetFieldSelections(ProcGroup)&chr(34)';

SET eProcedureGroup = 'chr(39)&GetFieldSelections(ProcGroup)&chr(39)';


When I view the variable in the same alternate state in a text box it gives me the selected ProcGroup from the alternate state 'Benchmark'.

I'm not sure why the variable is NOT working in the set analysis, but I think it has something to do with the Benchmark alternative state.  It used to work with ProcGroup = {'Total Knee'}, but there has been additional services added to the data.

I have ProcGroup which is a listbox filter on the alternate state Benchmark.  All the data on this tab uses the Benchmark alternate state.  Any ideas?

21 Replies
sunny_talwar

I am just curious why you need this?

Have you tried these?

Sum({Benchmark}BMHCA1PCT)

or

Sum({$<ProcGroup = Benchmark::ProcGroup>}BMHCA1PCT)

NickHoff
Specialist
Specialist
Author

The benchmark data is in 4 different tables, one for company, division, market, facility.  They share the same alternate state of benchmark with different proc groups.  The data will never be inherited on this tab.  I didn't know I could Benchmark::ProcGroup, but now I do.  I've always just used variables as they are easier to maintain than expressions, but can also be a pain to get the formatting correct.