Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
I'm currently facing a challenging issue with Matrix Total calculations in Power BI that I haven't been able to resolve despite extensive research, including videos and several forums like StackOverflow and the Fabric forum.
Problem Description: I am working with a matrix where I need to perform the following operations:
Additional Context:
Question: How can I adjust my calculations to respect the correct context within the matrix, ensuring that the totals at each hierarchy level and the overall grand total are accurate?
Any insights or suggestions would be greatly appreciated. Thank you for your help!
Unfortunately, this doesn't give me the right result. I get 6.41% instead of the requested 3.71%.
btw: of course I modified the code for my needs
Do you have any other idea please?
Thank you 🙏
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @paveldavid17 ,
Since you are doing the difference between the two column and using a measure the grand total is also part of that difference, best options is to do a SUMX however this needs to be done taking into account the others columns on your visualization.
What are the names of the other columsn you use for the hierarchy?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHello @MFelix ,
As I've noted earlier, while I employ parametric fields in my operations, for the sake of simplicity, let's consider that I'm utilizing a single hierarchy—specifically Customer hierarchy. This hierarchy is composed of the following columns within the 'MD_Customer' table:
Hi @paveldavid17 ,
In this case since the values are all from the same table (MD_Customer) you can try the following code:
C measure =
SUMX (
SELECTCOLUMNS (
Customer,
Customer[Consolidate Key Customer],
Customer[CustomerKey],
Customer[SoldtoName]
),
[CALCULATION YOU USE FOR C MEASURE]
)
Altough the example below is not fully matching yours the logic is the same:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
107 | |
88 | |
76 | |
67 |
User | Count |
---|---|
126 | |
111 | |
100 | |
83 | |
71 |