Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
RishabhTFC
Contributor III
Contributor III

Sum of the sorted values

Hi all

I am facing a problem.

I use firstsortedvalue function to get the prices of latest date of  products. Now I want to make a KPI that shows the sum of that sorted values of all the products.

thanks

2 Replies
vishsaggi
Champion III
Champion III

May be this?

= FirstsortedValue(Price, -Aggr(Sum(Price), Date, Product))

rubenmarin

Hi Shubham, aggr() can do the operation for each product, enclose it in a Sum() and you have the sum of the different products:

Sum(Aggr(YourExpression, ProductFieldName))