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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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