Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

IMPORTANT: Upcoming LEF Database Maintenance, Oct. 3rd - SEE DETAILS
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

firstsortedvalue with filters

I read many other posts, but I can't apply it to my case...


I think "firstsortedvalue" might be the solution.


Here's my Data (I gave my best to get a good example):

#Reporting PlantMaterial NumberMaterial DescriptionDirect Savings YearInvoice Amount CHFInvoice QuantityDiff. prev. YearCalc. Direct Savings CHFSavings / CostVendor Category
1Germany12345Apple2019                          480’250.86163’681-0.4802                               -115’571.35SavingsR
2Germany12345Apple2019                              3’952.291’125-0.4802                               -115’571.35SavingsM
3Germany12345Apple2018                          694’002.40240’158-0.4802                               -115’571.35SavingsR
4Germany12345Apple2018                                  940.13503-0.4802                               -115’571.35SavingsM


What do I want to do:

There are multiple same values for "Calc. Direct Savings CHF", but I only want to see the "Vendor Category", based/ranked on the <highest> "Invoice Amount CHF" per "Direct Savings Year"



#1, "Vendor Category" <R> would be shown, because the "Invoice Amount CHF" for 2019 is higher than #2

#3, "Vendor Category" <R> would be shown, because the "Invoice Amount CHF" for 2018 is higher than #4


Finally, out of the 4 lines, only 2 shall remain --> #1 & #3


hope this makes sense!

Thanks already 🙂

Labels (2)
10 Replies
Creator II
Creator II

To help you solve your problem, I need information about the data model and the chart in which you are using the measure. In principle I think that if you are using the set identifier {1} you do not depend on the selections made by the user, then, if the calculation does not depend on the "intervention" of the user, it could be solved at load time (script). Ideally, you should attach a qvf file with reduced information to evaluate your case.