Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
danosoft
Specialist
Specialist

Rangemax in a month

I have this set analisys:

Sum({<MESE_COMPETENZA={"$(=num(rangemax($(=GetFieldSelections(MESE_COMPETENZA))),'00'))"}>} TOT_CONSUMO_PERDITE)/1000,

This work ok, it take the maxmonth value for my field TOT_CONSUMO_PERDITE

the problem is: till i choose max six months, is all ok, if i choose seven months.... the expression show me "-" why?

1 Solution

Accepted Solutions
sunny_talwar

Why don't you just do this instead

Sum({<MESE_COMPETENZA = {"$(=Num(Max(MESE_COMPETENZA), '00'))"}>} TOT_CONSUMO_PERDITE)/1000

or if you really wish to use your existing expression... you can do this

Sum({<MESE_COMPETENZA={"$(=Num(RangeMax($(=GetFieldSelections(MESE_COMPETENZA, ',', 10000))),'00'))"}>} TOT_CONSUMO_PERDITE)/1000

View solution in original post

3 Replies
Brett_Bleess
Former Employee
Former Employee

Daniele, it would likely help if you can attach the QVW or an example QVW that shows the issue, so folks can see the data model etc.  Hard to figure these out at times without that extra information.   I cannot recall if I have already given you design Blog post on Set Analysis or not, so apologies if I did, but going to post again, just so you can check things against that too in order to see if you can spot something there that may explain things.

https://community.qlik.com/t5/Qlik-Design-Blog/Quotes-in-Set-Analysis/ba-p/1471824

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/ChartFunctions/...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
sunny_talwar

Why don't you just do this instead

Sum({<MESE_COMPETENZA = {"$(=Num(Max(MESE_COMPETENZA), '00'))"}>} TOT_CONSUMO_PERDITE)/1000

or if you really wish to use your existing expression... you can do this

Sum({<MESE_COMPETENZA={"$(=Num(RangeMax($(=GetFieldSelections(MESE_COMPETENZA, ',', 10000))),'00'))"}>} TOT_CONSUMO_PERDITE)/1000
danosoft
Specialist
Specialist
Author

i not use the first you wrote becouse it not work.
but the second using my expression and your suggest ", ',', 10000" now all work good. Thanks