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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sy898661
Helper V
Helper V

how to show % adherence to schedule

Hi again!

 

I was wondering if somone could help me create a measure or column or whatever to show % Adherence to Schedule. Currently, I have these columns:

 

ATS = DATEDIFF('Query'[Planned Completion Date], 'Query'[Actual Completion Date], DAY)

ATS Status = 
     IF('Query'[ATS] < 0, "Early", IF('Query'[ATS] = 0, "On Time", "Late"))

I am trying to show the adherence to schedule (% of orders that are ON TIME) in a table but I can't get it to work properly. I tried putting in ATS and doing "Show value as % of grand total" but it keeps showing up with 100% which (unfortunately lol) I know is incorrect.

 

Can anyone help with this? I feel like its probably a simple thing but I just  can't figure it out!

1 ACCEPTED SOLUTION
kcantor
Community Champion
Community Champion

@sy898661 

You need a count to determine your percentage. The calculations I see just define if an order is on time. You will need to apply that label to a count of orders to create a percentage of on time.

 

To do this, you need to create a calculation showing how many were on time and how many total 'orders' You can do this in multiple calculations or nested into one using VAR.

For simplicity, I would start with 3 seperate calculations.

Count of All Orders = DISTINCTCOUT(Table[OrderNo])

Count of On Time Orders = CALCULATE([Count of All Orders], [ATS Status] = "On Time")

% On Time = DIVIDE([Count of On Time Orders], [Count of All Orders])

Using multiple calculations allows you to place them in the visual to determine if the individual parts are correct.  A all in one calculation would be:

% On Time =

     VAR  CountofAllOrders = DISTINCTCOUT(Table[OrderNo])

     VAR CountofOnTimeOrders = CALCULATE([Count of All Orders], [ATS Status] = "On Time")

Return

     DIVIDE(CountofOnTimeOrders, CountofAllOrders)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
kcantor
Community Champion
Community Champion

@sy898661 

You need a count to determine your percentage. The calculations I see just define if an order is on time. You will need to apply that label to a count of orders to create a percentage of on time.

 

To do this, you need to create a calculation showing how many were on time and how many total 'orders' You can do this in multiple calculations or nested into one using VAR.

For simplicity, I would start with 3 seperate calculations.

Count of All Orders = DISTINCTCOUT(Table[OrderNo])

Count of On Time Orders = CALCULATE([Count of All Orders], [ATS Status] = "On Time")

% On Time = DIVIDE([Count of On Time Orders], [Count of All Orders])

Using multiple calculations allows you to place them in the visual to determine if the individual parts are correct.  A all in one calculation would be:

% On Time =

     VAR  CountofAllOrders = DISTINCTCOUT(Table[OrderNo])

     VAR CountofOnTimeOrders = CALCULATE([Count of All Orders], [ATS Status] = "On Time")

Return

     DIVIDE(CountofOnTimeOrders, CountofAllOrders)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you @kcantor !!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.