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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Guneet_B21
Helper II
Helper II

Datediff

Hi,

i need to calculate the difference between est date on the first entry of the project vs est date on the last entry of a particular project

and need to show this diff against each project

 

Guneet_B21_0-1655788840177.png

 

 

 

  

1 ACCEPTED SOLUTION
ddpl
Solution Sage
Solution Sage

@Guneet_B21 

 

Try this,

 

measure = VAR _min =
MINX(FILTER(ALL('Table'),SELECTEDVALUE('Table'[Project]) ='Table'[Project] ),'Table'[Est star])

VAR _max =
MAXX(FILTER(ALL('Table'),SELECTEDVALUE('Table'[Project]) ='Table'[Project] ),'Table'[Est End])

Return
DATEDIFF(_min,_max,DAY)

View solution in original post

4 REPLIES 4
ddpl
Solution Sage
Solution Sage

@Guneet_B21 

 

Try this,

 

measure = VAR _min =
MINX(FILTER(ALL('Table'),SELECTEDVALUE('Table'[Project]) ='Table'[Project] ),'Table'[Est star])

VAR _max =
MAXX(FILTER(ALL('Table'),SELECTEDVALUE('Table'[Project]) ='Table'[Project] ),'Table'[Est End])

Return
DATEDIFF(_min,_max,DAY)

Thanks alot,

this is working

amitchandak
Super User
Super User

@Guneet_B21 , A measure like

Sumx(Values(Table[Project]), calculate(datediff(Min(Table[est date]), Max(Table[EstClose], day)))

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak thanks for this formula,

it worked, however when i insert the est dates against this difference it sums up to 0

Guneet_B21_0-1655793670720.png

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.