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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
erenonem
Frequent Visitor

How to create Rankx mesaure using 1 measure and more than 1 table?

Hi,

 

I have 3 different master tables linked with some fact tables. All I want to create a Rankx measure, and rank those master tables fields by a specific measure.

 

My Sales measure works for 3 different fields and shows the results. If I create 3 different Rankx measure for each of those fields, its also working. 

 

They are different table and I m not able to use RANKX(<table>, <expression>, <value>, <order>, <ties>) function.

 

Any chance to get some help?

 

Table 1: Gender

Table 2: Age Group

Table 3: Region

 

Common Measure is Sales and working perfectly for 3 of them

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

HI @erenonem ,

Pls refer the below:

base table:

vluwangmsft_0-1664187042661.pngvluwangmsft_1-1664187055820.png

vluwangmsft_2-1664187063246.png

 

Result:

vluwangmsft_3-1664187077847.png

You could download my pbix file to learn detail operations.

 

 

 

Best Regards

Lucien

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

HI @erenonem ,

Pls refer the below:

base table:

vluwangmsft_0-1664187042661.pngvluwangmsft_1-1664187055820.png

vluwangmsft_2-1664187063246.png

 

Result:

vluwangmsft_3-1664187077847.png

You could download my pbix file to learn detail operations.

 

 

 

Best Regards

Lucien

HoangHugo
Solution Specialist
Solution Specialist

Hi

Create a table expression to combine your 3 table (they should same number of columns and column names), then rank it. Try this one

rank =
var table = UNION (table 1, table 2, table 3)
return RANKX([table],value)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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