Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
rrb2150
Frequent Visitor

Calculate Function| % of Total

Need some help. I have a matrix with columns as months(1-Jan, 1-Feb,1-march,...) and then week(July 30, aug6, Aug 13, Aug 20). Basically, month over month performance and the last 4 weeks of performance side by side. Now I have 2 levels of column hierarchy, if I remove the month/ week column and have only the dates as a column, it works fine. But with column hierarchy, it doesn't work. How do we change the formula, if that is something achievable?   % = DIVIDE(SUM(X), CALCULATE(SUM(X), ALL('[Field1],[Field2],[Field3]),0). Field 1,2,3 are row hierarchies. Please do let me know, if you need any additional information. Thank you for help.1.PNG 

1 ACCEPTED SOLUTION

Apologies for the late reply. I was able to figure out the error. There was a date filter on the visual which I was not including in my CALCULATE function initially. I was creating sample data and was able to figure that out. Thank you for your help.

View solution in original post

2 REPLIES 2
PaulDBrown
Community Champion
Community Champion

Please share non-confidential sample data or PBIX file





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Apologies for the late reply. I was able to figure out the error. There was a date filter on the visual which I was not including in my CALCULATE function initially. I was creating sample data and was able to figure that out. Thank you for your help.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.