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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rxp03570
Creator
Creator

Expression Error

Hi,

I'm trying to use a variable in an expression, but this doesn't seems to work. Here is my expression

Sum({<ATTRIBUTE2={'$(vPreviousMonth)'}>}Sales_Count) and

vPreviousMonth = Date(AddMonths(Max(Date#(ATTRIBUTE2, 'MMM-YYYY')),-1),'MMM-YYYY')


Any help here guys.


Thanks,

Rahul

5 Replies
dplr-rn
Partner - Master III
Partner - Master III

try

Sum({<ATTRIBUTE2={'$(=vPreviousMonth)'}>}Sales_Count)

rxp03570
Creator
Creator
Author

Doesn't help Dilip

dplr-rn
Partner - Master III
Partner - Master III

Odd i tested that on my test app. try this just in case

{"=$(=vPreviousMonth)"}

if it doesnt give more details on format of the column , dimensions used etc.

rxp03570
Creator
Creator
Author

Issue_Qlik.PNG

This is the data type for this field, and the variable I defined is the same as above.

jomar_ebonite
Partner - Contributor III
Partner - Contributor III

I think the error is coming from the variable expression.

Try below.

vPreviousMonth

Num(Month(Date#(ATTRIBUTE2, 'MMM-YYYY')))-1 & Year(Date#(ATTRIBUTE2, 'MMM-YYYY'))