Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
dk_24
Helper I
Helper I

Index for text table

Hi All,

 

i have to give the serail number to the text table like 1,2,3.for that i have created one index column.i have total 30 rows in source,so it's given 1 to 30 numbers.but when i summarige(Average the 30 records user wise) it giveing 27,28,30 instead of 1,2,3.

how t get the index for the below text table.

 

Text table index.png

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee


@dk_24 wrote:

Please fnd the below picture , 

 

Text table index.png

 

please let me know if your not clear with this.

 

Thanks,


@dk_24

So what you need is the index column? I'm not clear about what did you do while getting 27,28,29 as described, however you can create a calculated column with DAX.

index = RANKX(yourTable,yourTable[UserName],,ASC,Dense)

View solution in original post

6 REPLIES 6
Eric_Zhang
Microsoft Employee
Microsoft Employee


@dk_24 wrote:

Hi All,

 

i have to give the serail number to the text table like 1,2,3.for that i have created one index column.i have total 30 rows in source,so it's given 1 to 30 numbers.but when i summarige(Average the 30 records user wise) it giveing 27,28,30 instead of 1,2,3.

how t get the index for the below text table.

 

Text table index.png


@dk_24

Your description is not clear for me, would you mind sharing the pbix file? You can upload it to Onedrive/GoogleDrive and share the download link. Do remember to mask sensitive data before uploading.

Please fnd the below picture , 

 

Text table index.png

 

please let me know if your not clear with this.

 

Thanks,

Eric_Zhang
Microsoft Employee
Microsoft Employee


@dk_24 wrote:

Please fnd the below picture , 

 

Text table index.png

 

please let me know if your not clear with this.

 

Thanks,


@dk_24

So what you need is the index column? I'm not clear about what did you do while getting 27,28,29 as described, however you can create a calculated column with DAX.

index = RANKX(yourTable,yourTable[UserName],,ASC,Dense)

sorry i have cretead meaasure.now its working as expected. thanks.

Thanks for your response. no luck , getting the below error. "A single value for column 'User Name' in table 'Table1' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."
Eric_Zhang
Microsoft Employee
Microsoft Employee


@dk_24 wrote:
Thanks for your response. no luck , getting the below error. "A single value for column 'User Name' in table 'Table1' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."

@dk_24

I mean creating a calculated column, not a measure.

Capture.PNG

 

If a measure is required, you could try

index = RANKX(ALLSELECTED(yourTable),CALCULATE(MAX(yourTable[username])),,ASC,Dense)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.