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

Highlighted
Super User I
Super User I

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

Highlighted
Super User I
Super User I

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
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors