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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
appelture
Frequent Visitor

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

@appelture 

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

@appelture 

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!




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!?

@appelture 

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!




@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

@appelture 

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

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors