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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
jsobrinho
Creator
Creator

Aggr with range the date

Hi guys,

I have a expression that calculate the YTD value from some dimensions, and I need to create a rank from this values.

So my expression is like that:

aggr(Rank(Total(

sum({<$(vDimensions),Year=, Month=, Calendar={"<=$(=Max(Calendar))"}, Year={$(=Max(Year))},MetricsA={'>0'}>}Value),4,1),$(vDimensions))

But I think that I need something like that:

sum({<$(vDimensions),Year=, Month=, Calendar={"<=$(=Max(Calendar))"}, Year={$(=Max(Year))},MetricsA={'>0'}>}Value),4,1),$(vDimensions),$(vYTD))

Where vYTD is Calendar={"<=$(=Max(Calendar))"}, Year={$(=Max(Year))

But I don't know how to create the logical here in the aggr area.

 

@sunny_talwar  any idea?

Labels (3)
2 Replies
sunny_talwar

Would you be able to share a sample where I can see this expression getting used? Also, what is the output you expect to see based on the data shared?

Brett_Bleess
Former Employee
Former Employee

Jose, the following Design Blog might help:

https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822

If that is not what you need, search from the following link yourself to see if you can find a post that helps if you cannot attach app etc. for Sunny.

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

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.