Forum Discussion
Counting days between different changes made to a record
- Anonymous2 years ago
Hi HILGARTH,
May I ask if this is the expected output you are looking for? Based on your description, I calculated days between Status “Ordered” and “Shipped” and “Shipped” and “Delivered”, The following table shows the effect of the display.
Step: Create a new Calculated column, and drag the new Calculated column to the table visual.
Column = DATEDIFF ( CALCULATE ( MAX ( 'Table'[Date of last change] ), FILTER ( ALL ( 'Table' ), EARLIER ( 'Table'[Date of last change] ) > 'Table'[Date of last change] && 'Table'[Record ID] = EARLIER ( 'Table'[Record ID] ) ) ), 'Table'[Date of last change], DAY )If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi HILGARTH,
May I ask if this is the expected output you are looking for? Based on your description, I calculated days between Status “Ordered” and “Shipped” and “Shipped” and “Delivered”, The following table shows the effect of the display.
Step: Create a new Calculated column, and drag the new Calculated column to the table visual.
Column =
DATEDIFF (
CALCULATE (
MAX ( 'Table'[Date of last change] ),
FILTER (
ALL ( 'Table' ),
EARLIER ( 'Table'[Date of last change] ) > 'Table'[Date of last change]
&& 'Table'[Record ID] = EARLIER ( 'Table'[Record ID] )
)
),
'Table'[Date of last change],
DAY
)
If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Dear Yang
Great - that works!
thx & best regards