Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
Showing results for 
Search instead for 
Did you mean: 

Top x value with condition

Dear Members,

I am relatively new to the world of data analytics, especially QLIKsense. Right now I have an issue and I stucked with this RANK() and Set_Analysis. I have 2 buttons, first button labelled with TOP 50 and second one labelled with ALL, what I am trying to achieved are :

1. Display Top 50 Gross_revenue Group_ID where Group_ID is not equal to "214"
2. Display All Group_ID
3. Remove 0 value from the list

and this is my code :

if($(vTipTop)=50,If(Aggr(Rank($(vNetProfit),4) <= 50,{<[Group ID]-={"214"}>}),[Group Name]),
if($(vTipTop)>50,aggr(ONLY({<[Group ID]={"*"}>}{<[Group ID]-={"214"}>}[Group Name]),[Customer Name])))

Please advise where did I go wrong with the code because it is not working as expected.
(when button TOP 50 selected, it gives nothing)
(when button ALL selected, Total value is not matching with the actual manual calculation)


Labels (1)
0 Replies