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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
benvett14
Frequent Visitor

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. 

 

Example 1 (date) (distinct count) (real entries).PNG

 

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!

 

 

Example 2 (date) (row count) (expected entries).PNG

 

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

example 3.PNG

(DailyLogManpower = First table : DateDeminsion = Bottom Table)

1 REPLY 1
harshnathani
Community Champion
Community Champion

Hi @benvett14 

 

You can try this.

 

1.jpg

 

 

 

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)

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.