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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.