Forum Discussion

elponce's avatar
elponce
Frequent Visitor
8 years ago
Solved

Building a Percentage Table in Power BI

Hello!   I have the columns below (first Table) that I am trying to use to calculate a percentage of items completed "On-Time" per month and year by using the formula: # Items On-Time/ (# Items "On...
  • TomMartens's avatar
    8 years ago

    Hey,

     

    I would create a measure like so (please be aware that it is not tested, because I didn't recreate a table from your example):

    Compliance = 
    CALCULATE(
    count('table'[eventid])
    ,'table'[status] = "On-time"
    )
    /
    CALCULATE(
    count('table'[eventid]),
    ALL('table'[status])
    )

    Hopefully this provides the solution you are looking for.

     

    Regards

    Tom