Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey everyone,
It´s commonly known that the mode() function gives the most occurring value and gives a NULL value when 2 or more values share the same amount of occurrences. Is there any way to make the mode function show those two values, or at least one of them?
If possible, I'm okay with another expression. It's not necessary for me to use the mode() function.
Thanks in advance!
Have you tried something like
=Concat(Aggr( If(Count(WEEKDAY)=Max(TOTAL<DEBTOR> Aggr( Count(WEEKDAY),DEBTOR, WEEKDAY)),WEEKDAY), DEBTOR,WEEKDAY),', ')
Used in a table chart with DEBTOR as dimension.
Essentially, you need to get the grouping entities right.
Sample data will probably help to solve your issue.
Maybe like
=Concat(Aggr( If(Count(VALUE)=Max(TOTAL Aggr( Count(VALUE),VALUE)),VALUE),VALUE),', ')
Thanks for your reply Stefan!
This expression doesn't work unfortunately.
It gives me an output, but combines values that aren't even the most occurring 😕
Maybe I can give more info on my problem.
I want to show the most occurring weekday per debtor. This way I can see on what day the debtor is online the most.
For a lot of values I get one day as output. And for some I get a null value, because there are 2 or more days that occur the most.
Have you tried something like
=Concat(Aggr( If(Count(WEEKDAY)=Max(TOTAL<DEBTOR> Aggr( Count(WEEKDAY),DEBTOR, WEEKDAY)),WEEKDAY), DEBTOR,WEEKDAY),', ')
Used in a table chart with DEBTOR as dimension.
Essentially, you need to get the grouping entities right.
Sample data will probably help to solve your issue.
This worked!
Thanks!