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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
MitSom_1
Regular Visitor

RANKX for table visual with fields from multiple source tables

Hi all, this may sound really simple but I have been struggling with it.

 

I want add a rank measure in my table to give the rank of SupplierCode using the Points field, like this:

MitSom_1_0-1706005924350.png

But then I also want to add in an Area field that comes from a different source table, but when I do this, it messes up the ranking (I want it to ignore the Area for the ranking, but just rank Supplier code):

MitSom_1_1-1706006062173.png

Any idea what DAX code I need to use to get this? Any help would be very much appreciated.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MitSom_1 ,

Here some steps that I want to share, you can check them if they suitable for your requirement.

Here is my test data:
Table1:

vheqmsft_0-1706063062599.png

Table2:

vheqmsft_1-1706063078872.png

Relationship:

vheqmsft_2-1706063126929.png

1.Create a new table which add table 1 followed by table 2's AREA column

Table =
ADDCOLUMNS (
    table1,
    "Area", LOOKUPVALUE ( table2[Area], table2[SupplierCode], table1[SupplierCode] )
)

2.Rank by Points column(Create a new column)

Rank = RANKX(ALL('Table'), 'Table'[Points])

3.Final output

vheqmsft_3-1706063322689.png

 

Best regards

Albert He

 

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

1 REPLY 1
Anonymous
Not applicable

Hi @MitSom_1 ,

Here some steps that I want to share, you can check them if they suitable for your requirement.

Here is my test data:
Table1:

vheqmsft_0-1706063062599.png

Table2:

vheqmsft_1-1706063078872.png

Relationship:

vheqmsft_2-1706063126929.png

1.Create a new table which add table 1 followed by table 2's AREA column

Table =
ADDCOLUMNS (
    table1,
    "Area", LOOKUPVALUE ( table2[Area], table2[SupplierCode], table1[SupplierCode] )
)

2.Rank by Points column(Create a new column)

Rank = RANKX(ALL('Table'), 'Table'[Points])

3.Final output

vheqmsft_3-1706063322689.png

 

Best regards

Albert He

 

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

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.