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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
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.