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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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))