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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply

Calculating a date based on one variable in data

Hi all - I have some data (see sample).  I need to be able to produce a derived column in the dataset based on whatever the field is in column B (Type).  If it's Activity, then the date needs to show the date in column D (Event Date) and if it's Demand then it needs to show whatever date is in the Request Date column.  

 

I've shown this in the linked sample data, and the highlighted column in yellow (column E) is what it needs to show.  

 

Little stuck on this but I'm sure there must be a very simple way to calculate this, either in Power Query or as DAX.

 

Many thanks all!

 

Sample Data 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @Creative_tree88 

This should be pretty straighforward either with DAX or Power Query unles you 're looking for something else.

danextian_0-1747654755491.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

6 REPLIES 6
v-shamiliv
Community Support
Community Support

Hi @Creative_tree88 
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.

v-shamiliv
Community Support
Community Support

Hi @Creative_tree88 
I wanted to check if you had the opportunity to review the information provided by @danextian , @Vijay_Chethan  and @johnt75 . Please feel free to contact us if you have any further questions. If their response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

v-shamiliv
Community Support
Community Support

Hi @Creative_tree88 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

danextian
Super User
Super User

Hi @Creative_tree88 

This should be pretty straighforward either with DAX or Power Query unles you 're looking for something else.

danextian_0-1747654755491.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Vijay_Chethan
Super User
Super User

Hello Creative_tree88,
create a calculated column
Derived_date_column=
if([Type]="Activity",[Event Date],[Request Date])


if this hepls , please mark as solution

johnt75
Super User
Super User

Use Power Query. Go to the Add Column tab and choose Conditional Column. There you can plug in the values you need.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors