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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Need help with some DAX - calculating changover times

Dear experts,

 

I am facing difficulties with calculating changeover times between orders on production lines.

 

Changeover time is the period required to prepare a machine for it to change from producing the last good piece of the last batch to producing the first good piece of the new batch. For the data set below it means the difference in end time of the last batch and starting time of the new batch.

 

Each production order has a unique production ID and is connected to a production line (Lijn).

 

I would like to know the total change over time per line per day. Would any of you experts be able to writing some DAX to help me out?

 

tempsnip.png

 

1 REPLY 1
v-yuta-msft
Community Support
Community Support

Hi Luukv93,

 

Create a calculate column using DAX formula below and check if it can meet your requirement:

 

Change =
CALCULATE (
    ( MAX ( Table[ProductID] ) - MIN ( Table[ProductID] ) )
        / MIN ( Table[ProductID] ),
    FILTER (
        Table,
        Table[Lijn] = EARLIER ( Table[Lijn] )
            && YEAR ( Table[Begintijdn def] ) = YEAR ( EARLIER ( Table[Begintijdn def] ) )
            && MONTH ( Table[Begintijdn def] ) = MONTH ( EARLIER ( Table[Begintijdn def] ) )
            && DAY ( Table[Begintijdn def] ) = DAY ( EARLIER ( Table[Begintijdn def] ) )
    )
)

Regards,

Jimmy Tao

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.