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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
aheavy95
Creator
Creator

Problem with KPI expression

Hi I used this calculation for formatting large numbers:

aheavy95_0-1652797361855.png

this expression as a KPI measure works:

pick(vKPI_TOTAL_NET,$(vScaleNumber2(Sum({$<Year={2007}>}TotalDue))),$(vScaleNumber2(Sum({$<Year={2007}>}SubTotal_SO)))) 

But for some reason it doesn't work when I add the months , I get an error in the expression: 

pick(vKPI_TOTAL_NET,$(vScaleNumber2(Sum({$<Year={2007},[Month Num]={7,8,9,10,11,12}>}TotalDue))),$(vScaleNumber2(Sum({$<Year={2007}>}SubTotal_SO))))

 

any idea why?

Thanks a lot

Labels (3)
3 Replies
lukas_
Contributor III
Contributor III

Hello,

You can't use a comma in the set analysis of the parameter. You have to find a way around it, when possible

vinieme12
Champion III
Champion III

unfortunately coma's don't work with nested variables

the work around is to eliminate coma's completely from set analysis

Try below

Sum({$<Year={2007}>*<[Month Num]={"(7|8|9|10|11|12)"}>}TotalDue)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
aheavy95
Creator
Creator
Author

perfect that worked.

Now, Im trying to ignore a "year" filter. do you know how can I achieve this with that kpi expression ?

pick(vKPI_TOTAL_NET,$(vScaleNumber2(Sum({$<Year={2008}>}TotalDue))),$(vScaleNumber2(Sum({1}{$<Year={2008}>}SubTotal_SO))))