Forum Discussion

AmberJane's avatar
AmberJane
Icon for Helper III rankHelper III
4 years ago

% Calculations in Power BI

I am not sure why this is so hard. I tried using quick measures but I am getting nowhere. 

 

This first report here I want to create a column (I think?)  that gives me the % of closed. So there is 306 tickets and 165 are closed so I would I shoud see 54%. 

 

For this report I have the closed tickets from the previous report and I want to do a % of the types of closure reasons from the total number of the tickets. So I would expect to see 83% resolved, 16% Declined and 1% Declined - Too Old to Fix. Keeping in mind that we may add more closure reasons down the line. 

 

 

8 Replies

  • AmberJane , if you want show % of total in table for measure M1

     

    You can try

     

    divide([M1], calculate([M1], allselected())

     

    % of closed at GT level 

     

    divide(calculate([M1], filter(Table, Table[Item Status] ="Closed")),calculate([M1], allselected())

     

    or

     

    divide(calculate([M1], filter(Table, Table[Item Status] ="Closed")), [M1])

    • AmberJane's avatar
      AmberJane
      Icon for Helper III rankHelper III

      Hello, I am playing around with this but not sure what M1 would be in the calculation? Nothing is autopopulating. 

    • AmberJane's avatar
      AmberJane
      Icon for Helper III rankHelper III

      Ok I was able to get the first report working using the calculation you provided. See screenshot below! However, the second report I am still stuck on. 

       

      For this report I have the closed tickets from the previous report and I want to do a % of the types of closure reasons from the total number of the closed tickets. So I would expect to see 83% resolved, 16% Declined and 1% Declined - Too Old to Fix. 

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, 

    I think you should be using a calculated measure instead of a calculated column because both of these have a different method of calculation.

    Calculated columns perform calculations at row level and calculated measures perform calculations at an aggregated level which is suitable for percentage calculations. 

    Here's a mathematical description of the above statement.