Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kfir1987
Contributor II
Contributor II

Dynamic Set Analysis

Hi, 

I try to create a measure with dynamic set analysis! 

I have a few charts with the same measure, the measure preset top X materials based on the total consumption or present all the materials (based on selection - the customer can choose to see top X materials or all materials)  . 

So in order to create dinamic mesure , I created the below measure :

Sum({$< [Material Name] = {$(=vAstrix)}>} [Actual Overall Usage])

 

In addtion, I created the variable vAstrix to change the set analysis value based on selection (All or top X):

if($(vTopN) = 0,"*","$(=Rank(sum({$<Technology={'$(=pick(WildMatch(GetPossibleCount(Technology),0,1,'*'),'FDM',Technology,'FDM'))'} >} [Actual Overall Usage]))) < $(=vTopN)")

 

vTopN - hold the number for the top materials ( for example, if the user wants to see  top 5 materials this variable will be 5) 

 

So the vAstrix  will change the based on user selection, in case the user selected "All" the vAstrix is * otherwise the astrix will be the formula  :

 

"$(=Rank(sum({$<Technology={'$(=pick(WildMatch(GetPossibleCount(Technology),0,1,'*'),'FDM',Technology,'FDM'))'} >} [Actual Overall Usage]))) < $(=vTopN)"

 

 

for some reason, it doesn`t work, any suggestion? 

 

thanks 

2 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 

try this 

if($(vTopN) = 0,"*","=Rank(sum({$<Technology={'$(=pick(WildMatch(GetPossibleCount(Technology),0,1,'*'),'FDM',Technology,'FDM'))'} >} [Actual Overall Usage])) < $(=vTopN)")

kfir1987
Contributor II
Contributor II
Author

I changed the variable vAstrix to your formula and it still not working .