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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Custom column index based on Group

Hi, 

We are trying to create a custom index for comment field with respect associated number field. Unfortunately we do not have any date fields to condition. Below the data and expected output we are trying to. 

 

NumberComment Field
3003Comment
3003Comment
3004Comment
3004Comment
3004Comment

 

And we are trying to achieve lie below

 

NumberComment FieldIndex
3003Comment1
3003Comment2
3004Comment1
3004Comment2
3004Comment3

 

Background : Originally the comment foekd is coming from third party application as Rich Text form, and we are building report in Report Builder using Power Bi model as source. So in report builder if I create a table and add row number is it getting displaying as below .  We tried different options but because of the rich text the row number indent is not aligning. 

ivamsikrishna_1-1634574185587.png

 

 

1 ACCEPTED SOLUTION
sevenhills
Super User
Super User

Not clear whether you are planning to do in DAX, M Query or Report Builder

 

Dax:

https://datacornering.com/create-group-index-column-by-using-dax/

 

M Query:

https://radacad.com/create-row-number-for-each-group-in-power-bi-using-power-query 

 

Report builder / paginated report (same as ssrs):

https://docs.microsoft.com/en-us/sql/reporting-services/lesson-6-adding-grouping-and-totals-reportin...

 

https://www.dotnetspider.com/resources/45773-grouping-in-ssrs-reports.aspx

 

=RowNumber("NameOfMyDataSet")

Where you will use group name in place of NameOfMyDataSet ...

=RowNumber("Group")

 

View solution in original post

2 REPLIES 2
sevenhills
Super User
Super User

Not clear whether you are planning to do in DAX, M Query or Report Builder

 

Dax:

https://datacornering.com/create-group-index-column-by-using-dax/

 

M Query:

https://radacad.com/create-row-number-for-each-group-in-power-bi-using-power-query 

 

Report builder / paginated report (same as ssrs):

https://docs.microsoft.com/en-us/sql/reporting-services/lesson-6-adding-grouping-and-totals-reportin...

 

https://www.dotnetspider.com/resources/45773-grouping-in-ssrs-reports.aspx

 

=RowNumber("NameOfMyDataSet")

Where you will use group name in place of NameOfMyDataSet ...

=RowNumber("Group")

 

Anonymous
Not applicable

Great, thanks for sharing the links.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.