Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello Anonymous 

    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

    • Anonymous's avatar
      Anonymous
      Not applicable

      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

      • Anonymous's avatar
        Anonymous
        Not applicable

        Anonymous 

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