cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
josedavidsa
Frequent Visitor

Sort a matrix by a specific column.

Hello,
This is an example of my information:

 

tabla0.png

I need to create two matrices, one for costs and another for margin. I need both to be organized by "2018 costs":

 

TaBLE.png

 

Additionally I want to color the row of product B or whichever I choose.

 

I appreciate any help.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Sort a matrix by a specific column.

Hi

 

In this scenario,does this "I need both to be organized by "2018 costs"" mean to sort two matrixes by "2018 costs"?

If it is in this case, please refer to following steps.

For the matrix for costs, you need select “Sort By cost” as below.

10.png

 

For another for margin, make the “margin” column selected and select “cost” in Modeling->Sort by Column simultaneously.

11.png

12.png

 

To color the row for product B in both matrix, in Format pane->the conditional formatting, open Advanced controls dialog. This blog is for your reference.

Create a measure in your model that return 1 if a product is “B”, then in Color by rules mode chose to format the product name green if the measure returns 1

Measure = IF(MAX([product])="B",1,0)

13.png

14.png

 

Best Regards

Maggie

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Sort a matrix by a specific column.

Hi

 

In this scenario,does this "I need both to be organized by "2018 costs"" mean to sort two matrixes by "2018 costs"?

If it is in this case, please refer to following steps.

For the matrix for costs, you need select “Sort By cost” as below.

10.png

 

For another for margin, make the “margin” column selected and select “cost” in Modeling->Sort by Column simultaneously.

11.png

12.png

 

To color the row for product B in both matrix, in Format pane->the conditional formatting, open Advanced controls dialog. This blog is for your reference.

Create a measure in your model that return 1 if a product is “B”, then in Color by rules mode chose to format the product name green if the measure returns 1

Measure = IF(MAX([product])="B",1,0)

13.png

14.png

 

Best Regards

Maggie

View solution in original post

josedavidsa
Frequent Visitor

Re: Sort a matrix by a specific column.

Hi Maggie, thank you very much for your time.

 

Unfortunately it does not work, in your case works because your data is organized.

 

It is organizing by total and not by the year 2017.

FF316
Regular Visitor

Re: Sort a matrix by a specific column.

Hi,

 

I have the exact same requirement, have you ever come up with a solution?

Please let me know if you do, thank you.

 

Regards,

 

Felix

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors