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
Highlighted
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

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 

 


Proud to be a Datanaut!
"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
Highlighted
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

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 

 


Proud to be a Datanaut!
"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
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

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.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors