Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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>"))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
97 | |
75 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |