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
danielsouza
Helper III
Helper III

How to keep the same line order in table report?

I have this data model, with column DESCRIÇÃO ordered this way:

 

Order1.JPG

 

 

And I need to keep the same order in this table report:

 

Order2.JPG

 

 

 

Thanks a lot

Daniel

2 ACCEPTED SOLUTIONS
Hardik
Continued Contributor
Continued Contributor

you can sort the column Screenshot_8.pngScreenshot_9.png on both the data model and the report .Hope this helps @danielsouza

View solution in original post

danextian
Super User
Super User

Hi @danielsouza,

 

 

For the following steps, I am assuming that row order from your source file is the same as on  your screenshot  and the values in DESCRIÇÃO are unique - no duplicates. 

  • In the query editor, duplicate your original query. Right click on the query name from the query pane (left side) and then click Duplicate.
  • Select DESCRIÇÃO column, right click and then Remove Other Columns.
  • Filter the remaining column. Select Remove Empty. 
  • From Add Column tab, click Index Column. It doesn't matter whether your index starts from 0 or 1. 
  • Load the duplicate table to your model.
  • In the relationship view, drag DESCRIÇÃO  from the duplicate to the DESCRIÇÃO in the original table.
  • Once a relationship between the two is established, create a calculated colum in the original table. You can name it DESCRIÇÃO  sort order or anyway you want. The formula would be RELATED('Name of Duplicate Table'[Index]).  This calculated column will be used to custom sort DESCRIÇÃO.
  • Select the original DESCRIÇÃO column. From the Modeling tab in Power BI designer, click Sort by Column and select the calculated column in the prevoius step.
  • Put DESCRIÇÃO  in a table or matrix to check whether the custom sort order works.

 

Remove 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
danielsouza
Helper III
Helper III

Guys, you rock!

 

@danextianand @Hardik

 

Thanks a lot!

danextian
Super User
Super User

Hi @danielsouza,

 

 

For the following steps, I am assuming that row order from your source file is the same as on  your screenshot  and the values in DESCRIÇÃO are unique - no duplicates. 

  • In the query editor, duplicate your original query. Right click on the query name from the query pane (left side) and then click Duplicate.
  • Select DESCRIÇÃO column, right click and then Remove Other Columns.
  • Filter the remaining column. Select Remove Empty. 
  • From Add Column tab, click Index Column. It doesn't matter whether your index starts from 0 or 1. 
  • Load the duplicate table to your model.
  • In the relationship view, drag DESCRIÇÃO  from the duplicate to the DESCRIÇÃO in the original table.
  • Once a relationship between the two is established, create a calculated colum in the original table. You can name it DESCRIÇÃO  sort order or anyway you want. The formula would be RELATED('Name of Duplicate Table'[Index]).  This calculated column will be used to custom sort DESCRIÇÃO.
  • Select the original DESCRIÇÃO column. From the Modeling tab in Power BI designer, click Sort by Column and select the calculated column in the prevoius step.
  • Put DESCRIÇÃO  in a table or matrix to check whether the custom sort order works.

 

Remove 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Works for me thanks

Hardik
Continued Contributor
Continued Contributor

you can sort the column Screenshot_8.pngScreenshot_9.png on both the data model and the report .Hope this helps @danielsouza

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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