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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Ranking measure based on combination of different dimensions

HI.

I have a ranking measure in power BI that ranks a column based on sales. This column is a combination of market and product family, I have created this column by joining the market and product family dimensions to my fact table. That way I can concatenate the market and product family columns into one column in my fact table.

 

However this methodology is not very good for my sql query performance so it takes longer to query as I do the joins, so I want to modify my measure so that it ranks the combination of market and product family from their dimension tables, which are of course joined to my fact table by their respective keys. This is my current measure:

 

Ranking Sales Market-ProdFamily =


IF(

AND( [SalesMeasure] <> 0, NOT( ISBLANK([SalesMeasure] ) ) ),
RANKX( ALLSELECTED( SalesTable[Market-ProdFamily] ) , ABS( [SalesMeasure] ) , , DESC , Skip ) , 999999999
) ..

 

But as I said this only works because I have Market-ProdFamily column that had already been created previously in my fact table after joining the dimensions. 

Thank you

 

My three tables are 

Product_IDProductProductFamily
123456A1AAA
123457A2AAA
123458A3AAA
123459B1BBB
123460B2BBB
123461B3BBB
123462C1CCC
123463C2CCC
123464C3CCC
123465D1DDD

 

Market_IDMarket
1US
2ES
4FR
5DE
6GR
7PT
8PL
9CA
10AT

 

 

Product_IDMarket_IDSales
123460ES619
123456CA861
123460ES965
123456GR555
123464GR351
123462DE718
123460ES357
123463GR617
123461FR444
123460US904
123461ES295
123458GR203
123463ES437
123462ES846
1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

I didn't see any necessity to join tables; relationships work like a charm in most models to implicitly liaise tables. This is exactly the elegance and essence of PBI.

ThxAlot_0-1733573463785.png

 

Simple enough,

ThxAlot_1-1733573578837.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

2 REPLIES 2
ThxAlot
Super User
Super User

I didn't see any necessity to join tables; relationships work like a charm in most models to implicitly liaise tables. This is exactly the elegance and essence of PBI.

ThxAlot_0-1733573463785.png

 

Simple enough,

ThxAlot_1-1733573578837.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Anonymous
Not applicable

Exactly what I needed, I was trying with a cross join but this is much better. thanks a lot! 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors