Forum Discussion
dummy index column
Is there any way to create a dummy (or dumb) index column in a table/matrix visual, just for it to look nicer. Imagine you have a product sales table sorted by amount in descending order. Now you want to give it a sequencial index number to the rows, following the order the items/rows are displayed.
Later you want to format the table by alphabetic order (of the product´s description), with an index that follows the row sequence (in this case, alphabetic order)
Is there any option to do this quickly?
Hi,
I have solved a similar question in the attached PBI file.
Hi chiccofff
amitchandak's solution is the simplest method there is. You just need change the data format to whole number and add a condition so the row number isn't returned at the total row
6 Replies
- amitchandakSuper User
chiccofff , Table visual it is easy, you can use rownumber in the visual calculation and get it. Matrix you can get measure, but not before rows
- Ashish_MathurSuper User
- danextianSuper User
Hi chiccofff
amitchandak's solution is the simplest method there is. You just need change the data format to whole number and add a condition so the row number isn't returned at the total row
- ZanquetaSuper User
Hi chiccofff ,
Try this:
IndexVisual = RANKX( ALLSELECTED('Sales'[Product]), CALCULATE(SUM('Sales'[Amount])), , DESC, DENSE )RANKX function (DAX) - DAX | Microsoft Learn
If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.
Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.
- v-priyankataCommunity Support
Hi chiccofff
Thank you for reaching out to the Microsoft Fabric Forum Community.
danextian Ashish_Mathur amitchandak Zanqueta Thank you so much for your inputs.
I hope the information provided by users was helpful. If you still have questions, please don't hesitate to reach out to the community.
- v-priyankataCommunity Support
Hi chiccofff
Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.