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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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