Forum Discussion

benvett14's avatar
benvett14
Frequent Visitor
6 years ago

Formula Help (compliance %)

I am trying to create a measure that will give me a compliance % based on dates. The column highlighted (date) in the table below are my "completed dates", (the dates that complaince requirements were met), that i want to get a distinct count of to use as my numerator. 

 

 

The highlighted column in the chart below (date) is what I want to get a row count of and use as my denomonator. This chart is just a running list of ALL dates, as the one above is only the dates that compliance was met on. After the compliance % calculation is correct I plan to use a date filter to get the compliance % for a certain time period. I think this is where my formula is messing up as it isnt giving me the correct compliance % once i filter by a relative date range. Any help or tips are greatly appreciated!

 

 

 

The following is the formula I am currently using with a relative date filter.

(DailyLogManpower = First table : DateDeminsion = Bottom Table)

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi benvett14 

     

    You can try this.

     

     

     

     

    Complaince Percent =

    var a = COUNTROWS(ALL('Date'[Date]))
    var b = CALCULATE(DISTINCTCOUNT('Table'[Completed Date]),ALLSELECTED('Table'[Completed Date]))
    RETURN
    DIVIDE(b,a)
     

    Regards,
    Harsh Nathani

    Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)