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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

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

@Anonymous , 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
Anonymous
Not applicable

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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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