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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Keitaru
Creator II
Creator II

Dynamic % based on Slider Top 10 Selection

Hi Qlik experts need help here

have a Straight table with top 10 Ranking items 
Goal of this is to be able to adjust the slider bar below with the precentage number changing accordingly to the number of items there. Example top 10 (Percent add up to 100%)
as the slider moves down from 10 to 1 percentage should reflect total number of times in the table, like wise with the ranks. To a point Rank 1 (Top 1 percentage should show 100%).

Would anyone be able to help me with this my current  formula for percentage is 

Count / sum(TOTAL Count)

Keitaru_1-1725357942413.png

But the % number doesnt seem to change dynamically.

 

 

Labels (1)
3 Replies
brunobertels
Master
Master

hi 

may be try with aggr 

 

aggr( 

Count / sum(TOTAL Count) 

, counterparty)

Keitaru
Creator II
Creator II
Author

Did try this but it showing me top 11 calculation instead of the top N calculation according to the straight table.

Keitaru_0-1725413581878.png

Counteryparty count formula:
Count(DISTINCT {<Mismatch_Trade_Settlement_Month={'$(vMonth_Key)'}>}Mismatch_Trade_TXN_REF)

Keitaru_1-1725414821574.png


Rank Formula:
Rank(Count(DISTINCT {<Mismatch_Trade_Settlement_Month={'$(vMonth_Key)'}>}Mismatch_Trade_TXN_REF),4)

Percentage:
aggr(Count(DISTINCT {<Mismatch_Trade_Settlement_Month={'$(vMonth_Key)'}>}Mismatch_Trade_TXN_REF) / Count(DISTINCT TOTAL {<Mismatch_Trade_Settlement_Month={'$(vMonth_Key)'}>}Mismatch_Trade_TXN_REF), Counterparty)

Slider settings:
Slider variable vMismatch_Top_Count

Keitaru_2-1725416370326.png

brunobertels
Master
Master

Hi Not sure 

but trying this logic with an If statement 

IF( 

RANKFORMULA<= VMismatch_TOP_COUNT , 

YOUR MESURE

)

 

So may be 

 

IF(

Rank(Count(DISTINCT {<Mismatch_Trade_Settlement_Month={'$(vMonth_Key)'}>}Mismatch_Trade_TXN_REF),4)

< = $(vMismatch_Top_Count) , 

aggr(Count(DISTINCT {<Mismatch_Trade_Settlement_Month={'$(vMonth_Key)'}>}Mismatch_Trade_TXN_REF) / Count(DISTINCT TOTAL {<Mismatch_Trade_Settlement_Month={'$(vMonth_Key)'}>}Mismatch_Trade_TXN_REF), Counterparty)

)