Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Help Needed - Sort Multiple Table based on value in table A

Hi Everyone,

 

I am working on Power BI Dashboard for Financial Data

Table A: This year budget

Project Name               Category A     Category B     Category C   Total

Marketing X                     0.2                    0.1                    0.3           0.6

Websites ZC                     0.2                    1.0                    0.2           1.4

eCommerce                      0.5                   0.5                    0.2            1.2

Total                                 0.9                    1.6                   0.7             3.2

 

Table B: Last Year Budget

Project Name               Category A     Category B     Category C   Total

Marketing X                     0.4                    0.2                    0.4           1.0

Websites ZC                     0.5                    0.5                    0.2           1.2

eCommerce                      0.5                   0.7                    0.1            1.3

Total                                 1.4                    1.4                   0.7             3.5

 

We want Table A sorted based on Highest to Lowest for both column and row and Table B follow Table A

Expected Result:

Table A: This year budget

Project Name               Category B     Category A     Category C   Total

Websites ZC                    1.0                    0.2                    0.2           1.4

eCommerce                     0.5                    0.5                    0.2           1.2

Marketing X                      0.1                   0.2                    0.3           0.6

Total                                 1.6                    0.9                   0.7             3.2

 

Table B: Last year budget

Project Name               Category B     Category A     Category C   Total

Websites ZC                    0.5                    0.5                    0.2           1.2

eCommerce                     0.7                    0.5                    0.1           1.3

Marketing X                      0.2                   0.4                    0.4           1.0

Total                                 1.4                    1.4                   0.7             3.5

 

Any thought how we can do this Dynamically?

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Currently the matrix visual only supports to sort by Row header and Value field. To sort the column, you need to add a calculated column in the data table to calculate this year's budget in advance, then sort the category column by it. 

vjingzhang_0-1658116441426.png

 

Additionally, it is not supported to sort a matrix visual by values in another visual. You may also need to create a calculated column to sort by in advance. Does data in both visuals come from the same data table? Is the value field a measure or a column? Can you please share some dummy data to show the original data table then we can look into it if it is possible to create a calculated column for sorting-by? 

 

Best Regards,
Community Support Team _ Jing

Anonymous
Not applicable

Sure, my raw table consist of 2 sheet. First Sheet is project list, Second sheet is Category and Value like below

Project NameCategory20212022
WebsitesX100200
WebsitesY5010
Project AX120250
Project AY200400
    
amitchandak
Super User
Super User

@Anonymous , If this a matrix column, it can only sort on sort column

 

Assume the data is like

Product Name, Category , Value

 

Then you can create a new column

 

Cat value= Sumx(filer(Table, [Category] = earlier([Category])) ,[Value])

Category 1 = [Category]

And mark cat value as sort column for Category 1, and use that in visual

 

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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