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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis with expression returns wrong value!

Hello,

I've created a variable, that returns me the name of the month (f.e "January"). But when i use the variable in the expression:

=num(Avg({<ROUTERPOINT_NAME={'800100500','800120810','801101500'},ROUTEPOINT_MONTH={"=$(=vMonth)"},ROUTEPOINT_N_ENTERED={'>0'}>}ROUTEPOINT_SERVICE_FACTOR)/100,'# ##0,00%')

and it's returning the wrong value! But when i change vMonth to 'January' it's OK.

=num(Avg({<ROUTERPOINT_NAME={'800100500','800120810','801101500'},ROUTEPOINT_MONTH={'January'},ROUTEPOINT_N_ENTERED={'>0'}>}ROUTEPOINT_SERVICE_FACTOR)/100,'# ##0,00%')

I got stucked on that nad I'm quite confused.... I'm sure that vMonth returns January, I've checked that in Text Object...

Thanks in advance

Jacek Mossakowski

2 Replies
mikecrengland
Creator III
Creator III

Try

{'$(vMonth)'}

MIke

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Here's a tip for debugging a SA expression that contains a variable or $ ref. Clear out the Label field in the chart column. Then the column heading -- which you can hover on to see the entirety -- will show the SA expression after substitution.'

-Rob