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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

DAX formula to return first date based on two other columns

Hi guys,

 

Within DAX I am trying to find the first "Start" date of a project Phase within a project. There are multiple projects within the dataset and each project has multiple tasks assigned to a "Phase". I need to be able to identify the start and finish dates of each phase within the project. 

 

I am using the following formula to find the first date of a Phase, however, this is not limited to Study Name (project), so I get the same start date for each phase across all studies: 

 

TaskStartDate_StudyPhase = CALCULATE ( MIN ( Tasks[TaskStartDate] ), ALLEXCEPT ( Tasks, Tasks[StudyPhase] ) )
 
The image below indicates the state I would like to get to with different start and finish dates for each phase within the Study:

appelture_0-1623716238756.png

 

 

1 ACCEPTED SOLUTION

@Anonymous 

pls see the attachment below . Hope it's helpful.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
ryan_mayu
Super User
Super User

@Anonymous 

please try this

TaskStartDate_StudyPhase = CALCULATE ( MIN ( Tasks[TaskStartDate] ), ALLEXCEPT ( Tasks,Tasks[Study Name], Tasks[StudyPhase] ) )





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hi Ryan, thank you so much. Sorry, I have tried this and it is not working (can't work out why though, since the logic makes sense)... I still get the same start date for each phase across all Studies. Could an AND function be the trick? I am so new to Power BI that I am not sure!?

@Anonymous 

pls see the attachment below . Hope it's helpful.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

@ryan_mayu you little LEGEND! Thank you so much, that really helped!! Dimwit that I am, I had created a measure not a new column. Your file helped me see the error of my ways and all is now well in the world 🙂 Thanks again. Have a great one

@Anonymous 

you can use the same DAX to create measures. pls see attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors