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: 
Not applicable

Problem with expression

Hi

My expression -

sum({<Year={$(vMaxYear)},Date={'<=$(vMaxDate)'},Month={$(vMaxMonth)},Drawer={'7'}>}JrnAmt)

is giving me the correct sum for journals for Nov 2011. However when I change the expression to -

sum({<Year={$(vMaxYear)},Date={'<=$(vMaxDate)'},Month={$(vMaxMonth-1)},Drawer={'7'}>}JrnAmt)

which I hoped would give me the value for Oct 2011, it doesn't work.

I also tried this -

sum({<Year={$(vMaxYear)},Date={'<=$(vMaxDate)'},Month={$((vMaxMonth)-1)},Drawer={'4'}>}JrnAmt)

How can I fix this?

Regards

Danie

 

 

10 Replies
Not applicable
Author

Hi Jagan

I followed your suggestion and it now shows the month no (eg 12 for Dec) and the expression works for vMaxMonth

but not for vMaxMonth-1 so I'm back to square 1.

I'm attaching the model again - won't you please have a look if it's something I'm doing wrong in the expression please?

Regards

Danie