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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
eyefault
Contributor
Contributor

Date conditional KPI

Hey,

How can I make a collection sum to maximum date KPI ?

Example:

Period Revenue
202301 10
202301 15
202302 20
202302 20
202303 25
202303 15
202303 30

 

Might be result 70

I need Total 2023 revunue but function but the function should be dynamic, it should give the maximum date instead of the sum of 202303. 

5 Replies
priyanka181088
Partner - Contributor II
Partner - Contributor II

FirstSortedValue(Period, -Aggr(Sum(Revenue), Period))

 

i hope this helps

eyefault
Contributor
Contributor
Author

Nope 😞 it works but wrong resul. I tried with the following function, but I couldn't do Sum

Date(Max(Period)-1) 

 

BrunPierre
Partner - Master II
Partner - Master II

@priyanka181088 What do you expect as output?

eyefault
Contributor
Contributor
Author

25+15+30 = 70

BrunPierre
Partner - Master II
Partner - Master II

Sum( {$<Period = {"$(#=Max(Period))"}>} Revenue)