The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Can't quite figure out how to calculate running percentile in DAX.
In Excel I used:
=+SUMIF([Rank],"<="&[@Rank],[Percentile])
Any help would be appreciated!
Solved! Go to Solution.
Hi @austin_infinite ,
You might consider creating a Rank using a computed column:
Here are the steps you can follow:
1. Create measure.
Measure =
SUMX(FILTER(ALL('Table'),'Table'[Rank]<=MAX('Table'[Rank])),[Percentile])
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @austin_infinite ,
You might consider creating a Rank using a computed column:
Here are the steps you can follow:
1. Create measure.
Measure =
SUMX(FILTER(ALL('Table'),'Table'[Rank]<=MAX('Table'[Rank])),[Percentile])
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Balance, Rank and Percentile, are these measures or columns in your source data?
Those are all DAX Measures.
You are trying to calculate the moving average of a measure based on another measure. Usually this type of calcuation is heavy and is difficult to find an efficient solution. You may try the following. If not feasible then the options are either a calculated column or a calculated table.
Running Percentile =
VAR CurrentRank = [Rank]
RETURN
SUMX (
FILTER ( ALLSELECTED ( Data[Bill_to_Customer_No] ), [Rank] <= CurrentRank ),
[Percentile]
)
User | Count |
---|---|
14 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
28 | |
17 | |
11 | |
7 | |
5 |