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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
tresesco
MVP
MVP

How to store calculated single dimension value in a variable

Hi All,

i am using the following formula in a gauge chart to show the MTD growth(can't use direct InMonthTodate, because there is a different calendar used in the date field.)

=if(KOMONTH=vCurr_KOMONTH,aggr((Sum({<YEAR=,KOMONTH=,DAY=>} InYearToDate(BILL_DATE,'$(MaxDate)',0,1) * -1 * CCIQUANTITY*CCIUNIT_CASE) - Sum({<YEAR=,KOMONTH=,DAY=>} InYearToDate(BILL_DATE,'$(MaxDate)',-1,1) * -1 * CCIQUANTITY*CCIUNIT_CASE)) / (Sum({<YEAR=,KOMONTH=,DAY=>} InYearToDate(BILL_DATE,'$(MaxDate)',-1,1) * -1 * CCIQUANTITY*CCIUNIT_CASE)),KOMONTH)) .

This gives true value in a list box. But no value in a Textbox or in the GAUGE chart. i suspect this is because of dimension(use AGGR function).

OR simply guide me HOW CAN I STORE THIS(result) in a VARIABLE.

Anybody with a solution thought is appreciated.

With regards,

tresesco



1 Reply
tresesco
MVP
MVP
Author

Hey............I have got the solution!!!

The IF was the culprit. I simply replaced the if with Set analysis accordingly.....and then i was done.

enjoy QV!