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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

declaring variables in sum expresion

Hi everybody!!

I´m trying to do a pivot table report with that condition:

SUM

({$<MONTH={$(=MONTH)}>} IF(DIARIO='BSS' AND DH='H' AND MONTH>0,IMP_DIARIO,0))



My problem is that if I select one month (for example 2) I want to sum values from 1 to 2; If I select month 5, I want to sum values from 1 to 5. I tried to write SUM({$<MONTH<=... but it doesn´t work.

Any help? Thanks for your answers

Fiber9906

1 Solution

Accepted Solutions
sparur
Specialist II
Specialist II

Hello, Fiber.

try this:

SUM({$<MONTH={">0<=$(=vMONTH)"}, DIARIO={'BSS'}, DH={'H'} >} IMP_DIARIO)

View solution in original post

2 Replies
sparur
Specialist II
Specialist II

Hello, Fiber.

try this:

SUM({$<MONTH={">0<=$(=vMONTH)"}, DIARIO={'BSS'}, DH={'H'} >} IMP_DIARIO)

Not applicable
Author

Thanks for your help!! It works ok!

Fiber9906