Forum Discussion
Top N and Others
- 2 years ago
For your first requierement just create a calculated column
FruitName = IF(RANKX(ALLSELECTED('Fruit'),('Fruit'[Quantity]),,DESC,Dense)>3,"Others",Fruit[Fruit])and use it in the table visual instead of the your original column from the table source .
I am not sure if its possible to achieve your second requieremnt but I am hope I am wrong.The best that is possible based on my knowledge is create a measure
Title = "Quantity" & Year(TODAY()) & ""
and add it under the title property of your table visual
aarontanek , For first one Create a new table by going to modelling
Top3AndOthers =
VAR Top3 =
TOPN(3, 'YourTable', 'YourTable'[Quantity], DESC)
VAR Others =
EXCEPT(ALL('YourTable'), Top3)
VAR OthersTotal =
SUMX(Others, 'YourTable'[Quantity])
RETURN
UNION(
SELECTCOLUMNS(Top3, "Fruit", 'YourTable'[Fruit], "Quantity", 'YourTable'[Quantity]),
ROW("Fruit", "Others", "Quantity", OthersTotal)
)
And create a measure for Total Quantity