Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

 
 

 

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/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
Partner Ambassador/MVP
Partner Ambassador/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.