Forum Discussion
Help with DAX power BI
- 7 months ago
Hi Syndicate_Admin , Thank you for reaching out to the Microsoft Community Forum.
Please refer below sample spreadsheet snap:
Detenciones_Limpias snap:
Detenciones_Con_Producción snap:
Please refer attached .pbix file and output snaps and share your thoughts:
Hi Syndicate_Admin , Thank you for reaching out to the Microsoft Community Forum.
The key is to treat those split set up rows as one continuous stop whenever the second row begins right after the first one ends. The most reliable way is to handle this in Power Query, sort the detention table by date, machine, Level 2 and start time, then merge any rows within each group whose start time follows immediately after the previous end time. That produces a single consolidated event with one start, one end and one total duration, instead of two separate entries.
With those consolidated events in place, you can then relate detentions to the production database by using time overlap rather than matching single timestamps. For each detention event, look for production rows on the same date and machine where the production interval overlaps the detention interval. That gives you the correct squad, product or leader associated with that stop.
Yes, that's how I saw it.. However, I didn't know how to translate it into the M language of power query to be able to establish that relationship. Could you help me with it, please