Forum Discussion
Percentile Calculation on a Measure
Hi All,
I really appreciate your help in resolving issues in the community. I am very new to PowerBI and this community has been of great help. Could you please help in percentile calculation using a mesure.
Unsure if this is a best practice, but my dashboard has serveral selections(Year, Rev/CustomerCount, Variance, Tarrif etc). I need to show a graph of all these measure selections vs cities. I have tied one measure to another and made a since measure and this works when I put it in a graph of all the measure selection vs cities.
However, I need create a percentile on the selected measure criteria by comparing its own line items. I have tried several things but in vain.
PercentileCal =
Var CalculatedValue = [Map Selection]
Return
IF(HASONEVALUE(billing[derived_suburb]),
COALESCE(
DIVIDE(
CALCULATE(
COUNTROWS(billing),
FILTER(ALL(billing), CalculatedValue > [Map Selection] )),
CALCULATE(
COUNTROWS(billing),ALL(billing))),0))
Which results in the below table, but is incorrect. Could you please help?
amitchandak do you have any sugesstions please?
Anonymous , refer if this can help
https://www.goodly.co.in/calculate-percentile-in-power-bi/
or
https://finance-bi.com/power-bi-pareto-analysis/
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculate-the-sum-of-the-top-80/td-p/763156Can you share sample data and sample output in table format?
2 Replies
- amitchandak
Super User
Anonymous , refer if this can help
https://www.goodly.co.in/calculate-percentile-in-power-bi/
or
https://finance-bi.com/power-bi-pareto-analysis/
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculate-the-sum-of-the-top-80/td-p/763156Can you share sample data and sample output in table format?
- AnonymousNot applicable
Thanks amitchandak . I did try with something very similar to this blog and got it working. Mainly had to create a table with all the measure values, rank it accordingly and then calculate the percentile. I will update the solution sometime.