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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ManuelLindekeit
Contributor III
Contributor III

Using Aggr and Rank in Set Analysis

The following measure successfully creates a field called Rank that ranks multiple lines within a Quote based on Quote Extended Price. I need to use the table where this is in to send out an NPrinting report with a filter on Rank = 1. However, as far as I can tell, we cannot use a calculated dimension in a filter. 

Aggr(Rank(Sum({<[Quote Date]={"$(=Date(Today()-1))"},[Intercompany Flag]={'$(vIntercompany)'}, DateType={'Quote Date'}>}[Quote Extended Price]),2,2), [Quote Number],[%ItemKey])

My next thought was that I have to integrate above aggr/rank code into the other measure called "Amount" that I have in the table in order to limit the data to Rank = 1.

The measure is: Sum({<[Quote Date]={"$(=Date(Today()-1))"},[Intercompany Flag]={'$(vIntercompany)'}, DateType={'Quote Date'}>}[Quote Extended Price])

Please let me know if this is possible or if there is a better way to achieve this. 

 

0 Replies