Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello guys,
I would like some help regarding how do you calculate % over hierarchy levels.
I have a matrix, which has a the final results but it is missing a litte twist regarding how my months are ordered.
This is my solution, here you can see the 2.162 has 98% of 2019's Total and the following percentages as 17,7% of the 98% for august, and so on.
However, when I order my month in my calendar table by month number, the same matrix stays like this:
Can someone explain to me why this happens? And if possible, how can I turn this around.
As for the DAX measure that calculates the %, I followed this post by Arpita that is really nice: https://medium.com/geekculture/calculating-percentages-over-hierarchies-in-dax-power-bi-chapter-8-c3...
Hi @Anonymous ,
Try using ALLEXCPET() function instead of ALLSELECTED() function.
https://docs.microsoft.com/en-us/dax/allexcept-function-dax
If it doesn't help, you can check which variable is wrong by returning each variable separately.
Best Regards,
Jay
It didn't solve. The strangest thing is that with the Month Number it calculates correctly but if I change the variable from Month Number to Month Name, it gives a different value for the % of the month. But either Month Number and Month Name come from the Calendar Table.
Hi @Anonymous ,
Can you share some sample data? It's quite hard to figure out what's wrong in the formula without any data to test.
Best Regards,
Jay
Hi @Anonymous
Can you post sample data as text and expected output?
Not enough information to go on;
please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables
Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/