Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Highlighted
talxneit
New Contributor II

Iterative Count(Distinct) in table

Dear all,

I've got one question on how to manage a specific case (I'm not asking for the entire solution, but I'm struggling with how to build the data model - so the basic steps / ideas are highly appreciated Smiley Happy)

I have a table - let's say with different people liking different kind of fruits:

 

namefruit
Stephanapple
StephanBanana
MichaelOrange
MichaelBanana
StephanStrawberry

 

In fact the list is much larger by the way...

What I want to know:

I want to create an iterative Top-List, that means in that example:

Top1: Stephan: 3 kind of fruits

Top2: Michael: 1 kind (because for the next one I only want to count the fruits - not included in Top1

I hope this is understandable...

My question is how to manage this - I played with quite a lot possibilities (variable, set expressions) but I can only get to the Top2 

Additionally I need the calculation within the app, as (e.g. in this example) I want to exclude banana and recalculate my Top-List.

Any ideas how the approach could be?

Kind regards

Thorsten

Labels (1)
1 Reply
talxneit
New Contributor II

Re: Iterative Count(Distinct) in table

Hi everyone,

I've got the first approach:

I select the top rank and put the identified fruits to an "array" by concating it.

Now I'm trying to use this "valuelist" to put it into an set analysis to identify top2.

Still not working, but at least I think it is a good idea.

Do you agree?

Kind regards

Community Browser