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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Calculating changeover times (production processes)

Hi all,

 

I have a question regarding the calculation of change over times per supervisor per line.

 

I would like to gain insights in the change over times per supervisor and per line. 

 

The change over time is the difference between end time of a production order and the starting time of the next one on a production line.

 

It would be nice if someone can help me out on this.

 

tempsnip.png

2 ACCEPTED SOLUTIONS

Hi @Anonymous,

 

Is this what you need? Please check out. 

Measure =
VAR nextProductID =
    CALCULATE (
        MIN ( Table1[ProductielD] ),
        FILTER (
            ALL ( 'Table1' ),
            'Table1'[Aansturing] = MIN ( 'Table1'[Aansturing] )
                && 'Table1'[Lijn] = MIN ( Table1[Lijn] )
                && Table1[ProductielD] > MIN ( Table1[ProductielD] )
        )
    )
VAR endTime =
    MIN ( Table1[Eindtijd def] )
VAR nextStartTime =
    CALCULATE (
        MIN ( Table1[Begintijd def] ),
        FILTER ( ALL ( Table1 ), Table1[ProductielD] = nextProductID )
    )
RETURN
    DATEDIFF ( endTime, nextStartTime, MINUTE )

Calculating_changeover_times_production_processes

 

Best Regards,

Dale

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

View solution in original post

My pleasure.

Try this formula, please. @Anonymous.

Measure 2 =
SUMX (
    'Table1',
    IF (
        [Measure] >= 0
            && [Measure] <= 30
            && ISBLANK ( [Measure] ) = FALSE (),
        1,
        0
    )
)

Calculating_changeover_times_production_processes_2

 

Best Regards,

Dale

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

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Any one please?

Hi @Anonymous,

 

Is this what you need? Please check out. 

Measure =
VAR nextProductID =
    CALCULATE (
        MIN ( Table1[ProductielD] ),
        FILTER (
            ALL ( 'Table1' ),
            'Table1'[Aansturing] = MIN ( 'Table1'[Aansturing] )
                && 'Table1'[Lijn] = MIN ( Table1[Lijn] )
                && Table1[ProductielD] > MIN ( Table1[ProductielD] )
        )
    )
VAR endTime =
    MIN ( Table1[Eindtijd def] )
VAR nextStartTime =
    CALCULATE (
        MIN ( Table1[Begintijd def] ),
        FILTER ( ALL ( Table1 ), Table1[ProductielD] = nextProductID )
    )
RETURN
    DATEDIFF ( endTime, nextStartTime, MINUTE )

Calculating_changeover_times_production_processes

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-jiascu-msft

 

I have added an IF statement to filter on reliable (betrouwbaar) and unreliable (onbetrouwbaar), so I can filter between shifts (filtering out all unreliable values).  

 

Omsteltijden voorwaarden = 
IF( [Omsteltijden in minuten] > 30; "Onbetrouwbaar" ; IF( [Omsteltijden in minuten] <0 ; "Onbetrouwbaar" ; "Betrouwbaar"))

 

Now I was wondering  if you know some DAX code to calculate the reliable (betrouwbaar) values per lijn. In this way I can monitor the changeover times per day per supervisor, and discuss them with my supervisors.

 

 

tempsnip.png

 

 

 

My pleasure.

Try this formula, please. @Anonymous.

Measure 2 =
SUMX (
    'Table1',
    IF (
        [Measure] >= 0
            && [Measure] <= 30
            && ISBLANK ( [Measure] ) = FALSE (),
        1,
        0
    )
)

Calculating_changeover_times_production_processes_2

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Dale, thanks for previous solution. Working out quite well for me!

 

Would you know some DAX code to calculate the total changeover time per day/week (time period) ?

 

Best,

Luuk

Hi Luuk,

 

I would suggest you open a new thread in this forum. As far as I know, that can't be done by a single function. Please point out which DateTime column is used as a time period.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Many many many thanks!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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