Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

deepak_km9886
New Contributor III

Most occuring product

Screenshot (43) - Copy.png

I have given most occuring product for reference.

I need to return the product that is most frequently occuring product based on Measure .

Here E should return, since it has highest occurrences even though its margin is great.

My question is

Screenshot (43).png

when i have two or more most occuring product for eg D and E, then it should compare with the Margin % and should return D, since D has more margin %.

The expression should work if there are same number of products or not.

If there is no same number of occurrences, then directly it should print out highest margin % of highest occurences.

if there is a tie between count of products then, highest one with margin % should be returned.


How to achieve in qlik sense?

1 Solution

Accepted Solutions
MVP
MVP

Re: Most occuring product

Just like the other one...

FirstSortedValue(Product, -([Most Occuring Product] + Margin%/1E10))

7 Replies
MVP
MVP

Re: Most occuring product

Just like the other one...

FirstSortedValue(Product, -([Most Occuring Product] + Margin%/1E10))

YoussefBelloum
Esteemed Contributor

Re: Most occuring product

another alternative would be something like this:

=if(rank(TOTAL sum([most occuring product])&sum(margin))=1,  only(product))

deepak_km9886
New Contributor III

Re: Most occuring product

deepak_km9886
New Contributor III

Re: Most occuring product

I'm not getting the output. Just seeing a hyphen. Can  you share the screen shot

MVP
MVP

Re: Most occuring product

You marked the correct response... is this resolved now? If not, can you share the app where this isn't working for you?

deepak_km9886
New Contributor III

Re: Most occuring product

For the dummy inline data it is working, for the actual data it isnt working. Getting hyphen

MVP
MVP

Re: Most occuring product

Would you be able to provide a sample or sample image to show the issue? The more info you can provide, the easier it will be to help you out...

Community Browser