Forum Discussion
How to add row numbers to a table visual
- 5 years ago
Anonymous , You can not add row numbers to the table yet.
Refer this blog , how can use workaround
https://radacad.com/generating-row-number-in-power-bi-visualization-using-dax
I logged an idea for that
Serial No in Visual Table
https://ideas.powerbi.com/ideas/idea/?ideaid=80612ec5-14a9-4929-a2ee-531943fa51d4 - 4 years ago
Dear Power BI aspirant,
How to Add a Row Number in a Power BI Desktop Table Visual?
SCENARIO:
- You have added data from fields in your Table visual.- There are many (hundreds/thousands) of rows, but there is no number for each row.
- You want to add a number beside each row by adding a Number Column from your fields.
- You have not created any number columns as yet.
SOLUTION
- Create a New Measure
- Input DAX Formula below
DAX FORMULA
Row_Number =
CALCULATE (
DISTINCTCOUNT(TABLE[COLUMN WHICH NEEDS ITS ROWS TO BE COUNTED]),
FILTER(ALLSELECTED(TABLE), TABLE[COLUMN WHICH NEEDS ITS ROWS TO BE COUNTED] <= MAX(TABLE[COLUMN WHICH NEEDS ITS ROWS TO BE COUNTED]))
)Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dear Power BI aspirant,
How to Add a Row Number in a Power BI Desktop Table Visual?
SCENARIO:
- You have added data from fields in your Table visual.
- There are many (hundreds/thousands) of rows, but there is no number for each row.
- You want to add a number beside each row by adding a Number Column from your fields.
- You have not created any number columns as yet.
SOLUTION
- Create a New Measure
- Input DAX Formula below
DAX FORMULA
Row_Number =
CALCULATE (
DISTINCTCOUNT(TABLE[COLUMN WHICH NEEDS ITS ROWS TO BE COUNTED]),
FILTER(ALLSELECTED(TABLE), TABLE[COLUMN WHICH NEEDS ITS ROWS TO BE COUNTED] <= MAX(TABLE[COLUMN WHICH NEEDS ITS ROWS TO BE COUNTED]))
)
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Got a similar case and this method solves it perfectly, thanks!