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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
geogou1973
Creator
Creator

Problem with set analysis

Hello.

I have the following expression

=Sum({<SALES_DATE={'$(PREVIOUS_UDATE)'},FORMAT={'FRANC'},SALES_YEAR=,SALES_MONTH=>}AMOUNT_TRIG)+

Sum({<SALES_DATE={'$(PREVIOUS_UDATE)'},FORMAT={'HYPFL','SUPER','PROXI','CASHC','HYPMI'}-{'FRANC'},SALES_YEAR=,SALES_MONTH=>}SALES_AMT_FPA)

In this expression i have the sales for the previous day for format FRANC from the field AMOUNT_TRIG plus the sales the the previous day for the other formats except FRANC from the field SALES_AMT_FPA.

In this expression if i choose another format from the multi box i haven't the sales for the FORMAT i have choosen.

How can i have the same results like the expression give me but when i choose another FORMAT having the data for the choice i have done ?

Can anyone help me with this ?

Thank you in advance.

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If you want to choose the FORMAT from a multibox then don't hard-code it in the set analysis expression. Just remove FORMAT={'FRANC'}, and make sure that a value is selection in the multibox. Or create a variable that will make sure either FRANC or the selected value is used:

    vFormat: =If(GetSelectedCount(FORMAT)=1,FORMAT, 'FRANC')`

You can then use FORMAT={'$(vFormat)'} in your set analysis expression.


talk is cheap, supply exceeds demand