cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
LarsVolleberg
Frequent Visitor

Percentage measure calculation keeps giving wrong answers

Hi all,

 

I have been struggling with a fairly simple calculation (I'm new in DAX, but experienced in Excel).

Can someone please help me with the following and also explain to me why I keep getting incorrect answers?

 

I am trying to measure whether client assessments within our business are being done on time.

Once the system opens the assessment, employees have 14 days to finish it. I therefore add 14 days to the starting date, being the due date. Then, once the assessment is completed, the finish date is logged. after the due date, the assessment becomes overdue.

To measure the timeliness on a monthly basis, I have produced status labels based on these conditions for the first day of the month. 

LarsVolleberg_0-1664490884176.png

When an assessment is not created yet OR open on 1 aug AND closed on time on 1 sep, I know that it was finished too late. I want to calculate the percentage of Assessments closed on time / Total assessments closed.

 

To do so, I have been trying the following formula to create a measure of the timeliness of August (i.e. 1 aug- 1 sep)

 

 

 

// proportion closed on time
(COUNTAX(FILTER('AssessmentData',    
AND([Status 1 SEP 22]="Closed on time",
OR([Status 1 AUG 22]="Open on time",
[Status 1 AUG 22]="Non-existent"))),
'AssessmentData'[Status 1 AUG 22]))

//total closed
(COUNTAX(FILTER('AssessmentData',    
AND([Status 1 SEP 22]="Closed on time",
OR([Status 1 AUG 22]="Open on time", [Status 1 AUG 22]="Non-existent"))),
'AssessmentData'[Status 1 AUG 22]) 
+
COUNTAX(FILTER('AssessmentData',    
AND([Status 1 SEP 22]="Closed overdue",
OR([Status 1 AUG 22]="Open overdue", 
[Status 1 AUG 22]="Non-existent"))),
'AssessmentData'[Status 1 AUG 22])
)

 

 

 

 

Help is MUCH appreciated. Thanks in advance!!

1 ACCEPTED SOLUTION
LarsVolleberg
Frequent Visitor

I have figured out the solution already. Thanks and apologies for the inconvenience!

View solution in original post

2 REPLIES 2
LarsVolleberg
Frequent Visitor

I have figured out the solution already. Thanks and apologies for the inconvenience!

v-yadongf-msft
Community Support
Community Support

Hi @LarsVolleberg ,

 

Can you share with me some screenshots of your data after hiding sensitive information?

Thanks for your efforts & time in advance.

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors