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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hey All,
Ive used both these RANKX functions to calculate the ranking based on a measure and it is returning duplicate values for certain rows, as well as skipping numbers. As you can see in the screenshot below the numbers are not the same so i'm not sure what is happening here.
I've looked at all the other isntances of this happening and have not been able to find a solution that worked for me.
Any advice is apprecaited!
Ranking = RANKX(ALL(QUALNUMJULY[CAI],QUALNUMJULY[Qualification]),[% Diff All],,0,DENSE) Ranking = RANKX(ALL(QUALNUMJULY[CAI],QUALNUMJULY[Qualification]),[% Diff All],,0)
Ranking = RANKX(QualNumJuly,[% Diff All],,0)
I am calculating the % Diff column using these three DAX formulas
Calculates % of Column Total for all Categories
%OfAllTotal = Divide([Total Qual],CALCULATE([Total Qual],ALL(QUALNUMJULY[Qualification],QUALNUMJULY[CAI],QUALNUMJULY[DBAName],QUALNUMJULY[AccountNumber])))
Calculates total records
Total Qual = COUNT(QUALNUMJULY[Qualification])
Calculates the % Difference between Column Totals Based on available data sources
% Diff All = CALCULATE(QUALNUMJULY[%OfAllTotal],QUALNUMJULY[SourceIdentification] = "<A>") - CALCULATE(CALCULATE(QUALNUMJULY[%OfAllTotal],QUALNUMJULY[SourceIdentification] = "<Y>"))
The % Difference should always be calculated as DataSource A - DataSource Y.
At the moment there are only two data sources, in the future there will be many more, DataSource C, D, E....
Datasource Y will be a constant value, and Datasource A will change per Datasource.
I'm still learning RANKX but I thinkg your ALL is causing values filtered out of your report that the calcualtion is considering.
Still having the same issue without the ALL.
Here Are the DAX Formulas running my measure.
Calculates Total Records
Total Qual = COUNT(QUALNUMJULY[Qualification])
Calculates % Column Total per Categories
%OfAllTotal = Divide([Total Qual],CALCULATE([Total Qual],ALL(QUALNUMJULY[Qualification],QUALNUMJULY[CAI],QUALNUMJULY[DBAName],QUALNUMJULY[AccountNumber])))
Calculates Percent Difference Between % Column Total Per Data Source
% Diff All = (CALCULATE(QUALNUMJULY[%OfAllTotal],QUALNUMJULY[SourceIdentification] = "<Pivotal Payments>")) - (CALCULATE(QUALNUMJULY[%OfAllTotal],QUALNUMJULY[SourceIdentification] = "<CT Payments>"))