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

Get certified as a Fabric Data Engineer: Check your eligibility for a 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700. Get started

Reply
RahulShahane
Microsoft Employee
Microsoft Employee

Need help in calculating date difference in following

ADO.PNG

In this data I need to calculate date difference System.changed date. We are given with ID along with rev which is order of System.State change. Suppose we are having first ID 1049352 , for this ID , rev=1 i.e state is new and rev=13 when it is first time done. So we need to calculate date difference [( rev=13 Done)-(rev=1 New)]. Then similarly we have to go for next ID. Please help.

2 REPLIES 2
amitchandak
Super User
Super User

@RahulShahane , Try a measure like

 

AverageX(Summarize(Table, Table[ID], "_1", Minx(filter(Table, Table[System.state]="New"), [System.Createdatetime]), "_2", Minx(filter(Table, Table[System.state]="Done"), [System.Createdatetime])), datediff(_1,_2,day))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amit thanks for solution . I am trying this solution. If I get any difficulty in implementation I will get back to you. Thanks a lot

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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