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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
YunJ
Post Prodigy
Post Prodigy

Why rank number changed after add a sort column for the Dimtable?

Hi,

I made these two tables, I want them have the same Store sort. 

Capture.PNG

So I add a sort column for the DimStore. 

Capture2.PNGCapture.PNG

But as you see here, the MS Rank_CM has the wrong result. (Before I add the sort column, the rank result is correct.)

Capture3.PNG

Capture.PNG

Here is the pbix link: 

https://www.dropbox.com/s/yqzm5j4m9tk57co/ppt%20-%20Copy.pbix?dl=0

 

Thanks a lot for your help!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@YunJ , please add the sort column also in all or all selected

 

Rankx(all(Store[Store],Store[Store Sort]),[MS_CM_BLUE])

Rankx(allselected(Store[Store],Store[Store Sort]),[MS_CM_BLUE])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@YunJ , please add the sort column also in all or all selected

 

Rankx(all(Store[Store],Store[Store Sort]),[MS_CM_BLUE])

Rankx(allselected(Store[Store],Store[Store Sort]),[MS_CM_BLUE])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak Thanks a lot for your help!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.