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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors