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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
KevinJ
Contributor III
Contributor III

Rank with set analysis 2 dimensions

I have this dimension measure but it doenst show anything.

=aggr(if (rank( total sum({$<[Item Type]={'Inventory Item'}, Currency = {'PHP'}>},[Subtotal]))<=10,sum(num([Subtotal],'#,##0.00'))),[Item Name])

 

I want to have the top 10 only with focus on PHP and Inventory Item. 

 

What seems to be the problem of my code?

Labels (2)
1 Reply
F_B
Specialist III
Specialist III

Hi @KevinJ ,

the issue with your expression lies in how you're applying the AGGR and the RANK function within your set analysis, try this:

=aggr(
if(
rank(
sum({$<[Item Type]={'Inventory Item'}, Currency={'PHP'}>} [Subtotal])
) <= 10,
[Item Name]
),
[Item Name]
)

Hope this is what you were looking for