Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
PIAnalytical
Contributor
Contributor

Expression

Hello,

I have an expression that works on my KPI but does not work when I make a variable.  My objective is to show the sum for the maximum date as a KPI. 

 

 

=Sum({<[Month-Year]={"$(=Max([Month-Year]]))"}>}VALUE)

4 Replies
GaryGiles
Specialist
Specialist

How are you defining the variable?  Can you show an example?

PIAnalytical
Contributor
Contributor
Author

SET eCurrent =Sum({<Month-Year={"$(=Max(Month-Year))"}>}VALUE);

GaryGiles
Specialist
Specialist

I believe the $-expansion is taking place at the time you are defining the variable.  Try this instead:

Let eCurrent = 'Sum({<Month-Year={"$'&'(=Max(Month-Year))"}>}VALUE)';

This way, the $-expansion will occur when you use the variable in a measure expression $(eCurrent).

PIAnalytical
Contributor
Contributor
Author

No Luck. For the life of me I cannot figure out what the issue is