Forum Discussion
DAX - Percentile Calculation at different granularity
Do you have any Date table? what is the source of that Month Column?
Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/
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/- 23664 years ago
Helper I
I have shared it in DM. I have applied the date table now
- VahidDM4 years ago
Super User
Try these two:
Quartile 2_City = VAR _A = SUMMARIZE( Sheet1, Sheet1[Date], Sheet1[City], "M", [Margin] ) RETURN PERCENTILEX.EXC( _A, [M], .5 )Quartile_Country = VAR _A = SUMMARIZE( Sheet1, Sheet1[Date], Sheet1[Country], "M", [Margin] ) RETURN PERCENTILEX.EXC( _A, [M], .5 )Output:
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/