Forum Discussion
Showing only Bottom N values in chart
- 9 years ago
Hi
The following might be a solution. If I got you right, a product can be multiple times in your table.
1. Create A Measure "ProductsCount"
ProductsCount = COUNTROWS(Products)
2. The question now is: Which 5 of the 22 products shall be displayed? I created a column "SortValue" that takes the ProductId in account. Multiplying the "ProductsCount" measure by 1000000 and then adding the ProductID gives each Product a unique "SortValue". Of course this approach only works if the ProductID is an integer value.
SortValue = [ProductsCount]*100000 + Products[ProductId]
3. You can now create a visual with the Bottom 5 filter set on "SortValue"
Of course the formula for the "SortValue" formula depends on your actual data.I hope this helps!
JJ
Hi
The following might be a solution. If I got you right, a product can be multiple times in your table.
1. Create A Measure "ProductsCount"
ProductsCount = COUNTROWS(Products)
2. The question now is: Which 5 of the 22 products shall be displayed? I created a column "SortValue" that takes the ProductId in account. Multiplying the "ProductsCount" measure by 1000000 and then adding the ProductID gives each Product a unique "SortValue". Of course this approach only works if the ProductID is an integer value.
SortValue = [ProductsCount]*100000 + Products[ProductId]
3. You can now create a visual with the Bottom 5 filter set on "SortValue"
Of course the formula for the "SortValue" formula depends on your actual data.
I hope this helps!
JJ
- Anonymous9 years agoNot applicable
Thanks JJ, It worked. Really your explanation was good.
Regards,
Shailesh
- DoubleJ9 years ago
Solution Supplier
Anonymous glad it works!