Forum Discussion
DAX - Percentile Calculation at different granularity
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/
VahidDM that worked partially but it appears the filter for month is also being removed.
I need the percentiles to be reset for every month/year
- VahidDM4 years ago
Super User
Do you have any Date table? what is the source of that Month Column?
Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/- 23664 years ago
Helper I
No, I do not have an explicit Date table. I am using the inbuilt date hirearchy "Month" column in the visual
- VahidDM4 years ago
Super User
So It would be better to add a Date table to your model then it will be easier to find a solution.
How to create a Date table:https://www.vahiddm.com/post/creating-calendar-table-with-3-stepsCan you share a sample of your PBIX file after removing sensetive data?
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/