Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a text box with the following formula in it:
FIRSTSORTEDVALUE([Response Text],-AGGR(COUNT({<[Question ID]={'1'}>} [Response Text]),[Response Text]))
Which returns "Honesty" when there is a single value as the max.
Response Text | Count |
---|---|
Honesty | 13 |
Bravery | 11 |
Reliability | 8 |
But returns null ("-") when there is a tie at the top.
Response Text | Count |
---|---|
Honesty | 13 |
Bravery | 13 |
Reliability | 6 |
How can I make the text box return something like "Honesty, Bravery"?
My bad, try this
=Concat(DISTINCT Aggr(If(Count({<[Question ID] = {1}>}[Response Text]) = Max(TOTAL Aggr(Count({<[Question ID] = {1}>}[Response Text]), [Response Text])), [Response Text]), [Response Text]), ', ')
I would may be try it like this
Concat(DISTINCT Aggr(If(Count({<[Question ID] = {1}>} [Response Text]) = Max(TOTAL Aggr(Count({<[Question ID] = {1}>} [Response Text]), [Response Text])), [Response Text]), ', ')
My bad, try this
=Concat(DISTINCT Aggr(If(Count({<[Question ID] = {1}>}[Response Text]) = Max(TOTAL Aggr(Count({<[Question ID] = {1}>}[Response Text]), [Response Text])), [Response Text]), [Response Text]), ', ')
Sorry this is a wild and untested suggestion, but could you try wrapping the entire expression in Concat()?
If - is a result of multiple values being returned which cannot be displayed in a single cell, concat() will help. If it is a result of the function returning an internal null, then concat() will do nothing.
It's worth a try...
Ha, @Sunny, I had exactly the same idea...
I did try that, but I see an error: "Nested aggregation not allowed"
Nice, that works! Thank you!
I have this expression that works fine but only returns 1 value if is a tie.
FirstSortedValue( distinct Artigo_Categoria, -Aggr($(fVendaDCCat), Artigo_Categoria, Cliente_Codigo))
How can i change it to return all tied categories?
Thank you.