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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Smackcat
Helper I
Helper I

Order matrix columns by a column that exists on another table

Hi experts.

 

I have two tables:

 

Table1:

StatusAmount
Nice100
Bad50

 

Table2:

NameStatus
MariaNice
MarioBad

 

I'm using Table2 to get a matrix, and I want to order its rows with the Amount column in an ascendent order, not the Status column. So my result would be:

NameStatus
MarioBad
MariaNice

 

But I do not want to show the Amount column on the matrix. Any advice would be appreciated. Thanks

 

Pd: I want to add that I can't use the option "order by another column" on table 1 because they have multiple values according to the Amount column. They're unique values per country though

 

Table1:

StatusAmountCountry
Nice100USA
Bad50UK
Nice60UK
Bad120USA
1 ACCEPTED SOLUTION
v-yadongf-msft
Community Support
Community Support

Hi @Smackcat ,

 

I'm not sure the relationship between table 1 and table 2, but preferably there is a one to one relationship between them. So I add an index column into both tables.

 

This is my test table 1:

vyadongfmsft_0-1668136468413.png

 

Table 2:

vyadongfmsft_1-1668136495432.png

 

Create a new column in table 2:

 

Amount = LOOKUPVALUE('Table 1'[Amount],'Table 1'[Index],'Table 2'[Index])

 

 

Sort ascending for amount column:

vyadongfmsft_0-1668143764861.png

 

 

Create a matrix and it will sort by amount column:

vyadongfmsft_1-1668143788576.png

 

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yadongf-msft
Community Support
Community Support

Hi @Smackcat ,

 

I'm not sure the relationship between table 1 and table 2, but preferably there is a one to one relationship between them. So I add an index column into both tables.

 

This is my test table 1:

vyadongfmsft_0-1668136468413.png

 

Table 2:

vyadongfmsft_1-1668136495432.png

 

Create a new column in table 2:

 

Amount = LOOKUPVALUE('Table 1'[Amount],'Table 1'[Index],'Table 2'[Index])

 

 

Sort ascending for amount column:

vyadongfmsft_0-1668143764861.png

 

 

Create a matrix and it will sort by amount column:

vyadongfmsft_1-1668143788576.png

 

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

HoangHugo
Solution Specialist
Solution Specialist

Hi, I think if can not use " "order by another column", you must put Amount column into your matrix to make sort. You can narrow the Amount column, change its color format to be invisble.

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors