cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nico_koehler Frequent Visitor
Frequent Visitor

How would you solve this problem?

Hey guys,

 

I'll try to explain this situation as detailed as possible. 

 

I get a lot of daily data from an API that's related to production machines. There are 3 shifts (an early shift, a late shift and a night shift). Each shift needs to complete an inspection per day. On some machines only 2 inspections per day are required (so they are a special case which needs to be considered)

 

The daily data consists of events that happened at each machine. Some of those events are inspections.

 

Basically, I want to check if each shift completed their inspection. If they need to do 3 inspections and they do 3 inspections then they are at 100%.

 

But sometimes there are 3 inspection events in the early shift and 0 inspection events in the late and night shift.

 

So overall there are 3 inspection events but all in the same shift so the result should be 33% because every shift needs to do at least 1.

 

It is possible to see in which shift an event occured.

 

Sometimes a shift is not producing. We need to take this into account as well because if they are not producing they don't need to do an inspection. 

 

How would you tie this all together in DAX? So that my overall result will be an accurate representation of reality with nothing left out?

 

How would you do this in DAX?

 

 

4 REPLIES 4
Collin Member
Member

Re: How would you solve this problem?

Hello @nico_koehler 

you could make four columns , 

first three are your shifts,  fourth column is your result 

you could do a simple tally  for if an inspection is compleat.

if a shift is compleat, put a 1 , if incompleat, 0 

for the fourth column you can simply add the first three and devide by 3 to get a percent complete. 

 

hope this helps, 

Collin

nico_koehler Frequent Visitor
Frequent Visitor

Re: How would you solve this problem?

It needs to be checked for 20 machines. I think I can't do it this way?

And it should be done in such a way that I can easily calculate the MTD result as well

Collin Member
Member

Re: How would you solve this problem?

@nico_koehler 

every row would be one machine you could even add a column for the name or title of each station,  what is your MTD??

Highlighted
nico_koehler Frequent Visitor
Frequent Visitor

Re: How would you solve this problem?

Month to date result,

 

So basically this needs to be checked for every machine every day and then out of these daily values I need to be able to calculate a month to date completion percentage

 

would you still do it with those columns then? if yes, how would you do this exactly? new table or how?