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: 
QFanatic
Creator
Creator

Expression not working

Hi All

Please find below my problem. My Table only contains these 4 fields and a variable called vPreviousPeriod that is equal to 201910 at the moment.

I've created 2 textboxes so you can see what I am trying to do. The top one, shows the expression I'm using. The bottom one, the result.

I want to get the FINYR_CALL for the max(CALLMONTH) but its not working.

Please may you assist with my expression?

 

Thanks

 
 

 

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
MVP
MVP

Because FINYR_CALL is a string, the Max() function will not work.  Max() only works with numeric values. 

Use MaxString() instead.  Since there only seems to be a one-to-one between CALLMONTH and FINYR_CALL, you could use Only() as well, which I think would be preferable.

=only({<CALLMONTH = {"$(='$(vPreviousPeriod)')"}>}FINYR_CALL)

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

2 Replies
rwunderlich
MVP
MVP

Because FINYR_CALL is a string, the Max() function will not work.  Max() only works with numeric values. 

Use MaxString() instead.  Since there only seems to be a one-to-one between CALLMONTH and FINYR_CALL, you could use Only() as well, which I think would be preferable.

=only({<CALLMONTH = {"$(='$(vPreviousPeriod)')"}>}FINYR_CALL)

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

QFanatic
Creator
Creator
Author

Thank you Rob, much appreciated.