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

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

Reply
Anonymous
Not applicable

Adding a new column with two conditions from other columns in same table

Hey all,

 

The sample below reflects what I want to achieve with the DateCompleted.

I need to create a new column (DateCompleted) that will contain the earliest date that the order was completed.

What is considered completed in this senario is StatusCode 30, 40 and 50.

The issue is that some of the dates have not be captured by the system, so I can't consider only StatusCode 30 as my completed date; but the earliest date from StatusCode 30,40 or 50.

And I have to consider that for each set of rows of the same OrderNumbers.

 

Any DAX formula I can use to achieve this please?

 

Hisham1984_0-1626403537602.png

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Picture1.png

 

Link to the pbix file 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Picture1.png

 

Link to the pbix file 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

@Jihwan_Kim 

 

I tried to adapt the code to calculate the Date difference between the complete date and the Open date, but got an error.

Please see below if you can help.

 

Hisham1984_0-1626409769756.pngHisham1984_1-1626409805992.png

 

Anonymous
Not applicable

@Jihwan_Kim Thank you Champ! 🙂

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.