Forum Discussion
Anonymous
1 year agoNot applicable
Redundand values
Hello community, How do I aggregate all the values that are not top 10 of sum values as 'other'? Many thanks,
- 1 year ago
Hi Anonymous
Please try this one:
Product Grouping =VAR CurrentCategory = SELECTEDVALUE('Superstore'[Product Name])VAR Top10Categories =CALCULATETABLE(TOPN(10,VALUES('Superstore'[Product Name]),[Total_Sales],DESC),ALLSELECTED('Superstore'[Product Name]))RETURNIF(CurrentCategory IN Top10Categories,[Total_Sales],"Other")If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thank you.
Elena_Kalina
1 year agoSolution Sage
Hi Anonymous
Please try this one:
Product Grouping =
VAR CurrentCategory = SELECTEDVALUE('Superstore'[Product Name])
VAR Top10Categories =
CALCULATETABLE(
TOPN(
10,
VALUES('Superstore'[Product Name]),
[Total_Sales],
DESC
),
ALLSELECTED('Superstore'[Product Name])
)
RETURN
IF(
CurrentCategory IN Top10Categories,
[Total_Sales],
"Other"
)
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thank you.
Anonymous
1 year agoNot applicable
This actually works.
Thank you so much, Elena_Kalina