Forum Discussion

rrb2150's avatar
rrb2150
Frequent Visitor
4 years ago
Solved

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. 

  • rrb2150's avatar
    rrb2150
    4 years ago

    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.

2 Replies

  • PaulDBrown's avatar
    PaulDBrown
    Icon for Community Champion rankCommunity Champion

    Please share non-confidential sample data or PBIX file

    • rrb2150's avatar
      rrb2150
      Frequent Visitor

      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.