Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
piotr-bratek
Contributor III
Contributor III

FirstSortedValue based on AGGR and two dimensions

Hi Guys,

the situation is as presented below. On the left source data, on the right - what I'm trying to get. Important! I want to calculate it in a table on a sheet.


fsv1.png

What I've tried is presented below but the FSV function returns incorrect results. Can you pls advice where is the mistake?

fsv2.png

QVF is attached.

Thanks!

ex-Training Manager at Qlik Central-Eastern Europe
Labels (2)
2 Replies
crusader_
Partner
Partner

Hi Piotr,

You were pretty close 🙂

firstsortedvalue(Country, -aggr(max(Sales), Product,Country))

PFA example.

//Andrei

xufei123
Partner
Partner

Dim1:

Product

 

Dim2:

Country

 

Measure:

if(rank(Sum(Sales))=1,
 sum(Sales)
)

Uncheck "Include zero values" under Add-ons.