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
RadaSTL
Advocate I
Advocate I

RankX Measure Works Different on Different Visuals

Hello, I've read several topics here but nothing concrete or useful I could find. However there are several people that had the same issue, anyway here it goes:

 

I have 2 different ranking function, where I get the ranking for companies based on their sale amounts. While I have all the companies on a table, everything seems to be working fine, but when I pull one company on a card, the ranking usually slips, it is not only annoying but also very mysterious.... Is there something I miss? Or something I do wrong? Here are the measures I've written for this:

 

rankx.jpg

 

  • Satış Sıra (U):=RANKX(ALL(Firmalar[SFDistribütör]),CALCULATE([Aylık Kümülatif Satış (U)]),,DESC,Dense)
  • Aylık Kümülatif Satış (U):=CALCULATE([Satış (U)],DATESBETWEEN('Tarih Tablosu'[Tarih],DATE(YEAR([SelectedDate]),MONTH([SelectedDate]),1),[SelectedDate]),ALL('Tarih Tablosu'))
  • Satış (U):=IF(HASONEVALUE('Ölçüt'[ID]),SWITCH(VALUES('Ölçüt'[ID]),1,CALCULATE(SUM('ProdPack Daily'[Gross TL])),2,CALCULATE(SUM('ProdPack Daily'[Gross Pack])),3,CALCULATE(SUM('ProdPack Daily'[Net TL C])),4,CALCULATE(SUM('ProdPack Daily'[Net Pack]))),BLANK())
  • SelectedDate:=MIN(MAX('Tarih Tablosu'[Tarih]),MIN(CALCULATE(MAX('ProdPack Daily'[Date]),ALL('ProdPack Daily')),TODAY()))

 

1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @RadaSTL,

 

From below screenshot, you can see that the rank measure returns the same result in table visual and card visual.

1.PNG

 

In your scenario, the context might be more complex that leads to different results in different visuals. Could you simplified the measure [Satış (U)] like below for a test? 

  • Satış (U):=CALCULATE(SUM('ProdPack Daily'[Gross Pack]))

Regards,

Yuliana Gu

 

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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