cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
danielsouza Regular Visitor
Regular Visitor

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

Accepted Solutions
Hardik Established Member
Established Member

Re: How to keep the same line order in table report?

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 New Contributor
New Contributor

Re: How to keep the same line order in table report?

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 

 

"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
www.linkedin.com/in/danebelarminocpa

View solution in original post

4 REPLIES 4
Hardik Established Member
Established Member

Re: How to keep the same line order in table report?

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 New Contributor
New Contributor

Re: How to keep the same line order in table report?

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 

 

"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
www.linkedin.com/in/danebelarminocpa

View solution in original post

danielsouza Regular Visitor
Regular Visitor

Re: How to keep the same line order in table report?

Guys, you rock!

 

@danextianand @Hardik

 

Thanks a lot!

CMC Frequent Visitor
Frequent Visitor

Re: How to keep the same line order in table report?

Works for me thanks

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)