Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
i have a machina which save time data in a base at each time we change the product (column 3). But sometimes the machina have a bug and write a rows without reason.
So i have this data, but i want this :
You will see that the End Time is the same than the Start Time at the next row. But i want merge the data on one row if the product number is the same to have the good duration for each product.
Thanks a lot...
horodatage debut | horodatage fin | produit |
01/01/2022 06:00:00 | 01/01/2022 08:00:00 | FL1004 |
01/01/2022 08:00:00 | 01/01/2022 12:00:00 | FL1004 |
01/01/2022 12:00:00 | 02/01/2022 08:00:00 | FL1004 |
02/01/2022 08:00:00 | 02/01/2022 14:00:00 | FV0937 |
02/01/2022 14:00:00 | 03/01/2022 09:00:00 | FN1199 |
03/01/2022 09:00:00 | 03/01/2022 11:00:00 | FN1199 |
03/01/2022 11:00:00 | 03/01/2022 14:00:00 | FV0937 |
@Anonymous Create a Group By step in Power Query Editor? Alternatively in DAX you can work with offset rows using something like MTBF. See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586.
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
8 | |
8 | |
7 |
User | Count |
---|---|
17 | |
13 | |
7 | |
6 | |
6 |