Forum Discussion
2366
Helper I
4 years agoDAX - Percentile Calculation at different granularity
Hello, I have a data set which is at multiple granularity - Region, Country, City, Daily with Profit as my measure Now I want to calculate percentiles at different grain dynamically. ...
VahidDM
Super User
4 years agoHi 2366
Try this:
CALCULATE(PERCENTILEX.EXC(ALLEXCEPT(Sheet1,Sheet1[City],Sheet1[Month]),[Margin],.5))
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
- 23664 years ago
Helper I
Hi VahidDM ,
Thanks but it returns blank as it doesnt seem to calculate percentiles at Monthly/City grain
- VahidDM4 years ago
Super User
2366
Try this:for City:
PERCENTILEX.EXC(Sheet1,[Margin],.5))
For Country :
CALCULATE(PERCENTILEX.EXC(Sheet1,[Margin],.5),removefilters(Sheet1[City]))If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/