Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Im having an issue with the rank function. Currently I have a two slicers One on date and the other on Trade counterparty. The rank function works when I change the date but when I change the trade counterparty to narrow it down somehow the rank changes.
This is currently before adding the slicer, and this is the result after the slicer is applied:
Somehow Gold goes from 2nd in the first ranking to 3rd in the second ranking.
This is my rank function:
CommRank =
CALCULATE (
RANKX (
ALL('DEXTR_EQ_Trades'[TRD_COUNTERPARTY]), // Replace 'Table' and 'Column To Rank' with actual table name and column
CALCULATE ( SUM ('DEXTR_EQ_Trades'[TRD_COMMISSION_GBP]) ) // Replace 'Table' and 'Value Column' with actual table name and column that has the values to calculate
)
)
Any help would be appreciated.
Solved! Go to Solution.
Hi @Anonymous , @rajendraongole1 Thank you for your prompt reply!
Based on my testing, the Rank value will change based on the multislicer context.
As a workaround, we can transform the data in Power Query, sort the TRD_COMMISSION_GBP columns in descending order, and then add index columns to make the sorting static:
In this way, we can see the difference between the original rank column and the index column:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous , @rajendraongole1 Thank you for your prompt reply!
Based on my testing, the Rank value will change based on the multislicer context.
As a workaround, we can transform the data in Power Query, sort the TRD_COMMISSION_GBP columns in descending order, and then add index columns to make the sorting static:
In this way, we can see the difference between the original rank column and the index column:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous - Can you try the below measure that the rank calculation includes all possible values of TRD_COUNTERPARTY. The ALLSELECTED function ensures that the sum of TRD_COMMISSION_GBP respects the currently selected slicers.
CommRank =
CALCULATE (
RANKX (
ALL ( 'DEXTR_EQ_Trades'[TRD_COUNTERPARTY] ),
CALCULATE ( SUM ( 'DEXTR_EQ_Trades'[TRD_COMMISSION_GBP] ) ),
,
DESC
),
ALLSELECTED ( 'DEXTR_EQ_Trades' )
)
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi,
Im looking for the rank to stay the same and not change how it is calculated.. For example as the "GOLD" is in rank 3 before i select the slicer. When I select the slicer for just GOLD then I want the rank to still be 3, I dont want the rank calculation to be affected.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!