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
milmendez
New Member

DAX Command

I have a table that include Created date and Topic columns.  I need to add a formula in a new Due date column where PBI will take that Created date (formatted as 8/4/2023), and add 2 days (excluding weekends) but only when the Topic equals TeamConnect>Performance/Slow/Freezing.  If Topic is anything other than that, then Due Date should be 1 day (excluding weekends).   The Due date should display as a date.

Ex. Created date is Friday 8/4/2023 and the Topic is TeamConnect>Performance/Slow/Freezing, then Due date displays 8/7/2023 but if Topic is Reports>Add New, then due date displays 8/8/2023.

 

I tried creating it as a conditional column, but was stuck at the output value since I wasn't sure how to code it to display as a date.

 

I think i need to use a logical function, but i'm not sure if i need additional columns first or i can do everyting within the DAX command or column formula.  I'm new to PBI and got assigned a tough one. Any help would be greatly appreciated.  Thanks.

2 ACCEPTED SOLUTIONS
barritown
Super User
Super User

Hi @milmendez,

You could try a calculated column like this: 

barritown_0-1691660052902.png

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

View solution in original post

Thank you so much.  I was able to get that formula to work exactly how I needed it to.  Awesome!

 

I do have another question.  I have three other Topics that would follow the same ruleHow can I add additional Topics to the fomula. 

VAR MainAddendum = IF ( 'Help Requests'[Topic] = "TeamConnect>Performance/Slow/Freezing", 2, 1)

View solution in original post

5 REPLIES 5
barritown
Super User
Super User

Hi @milmendez,

You could try a calculated column like this: 

barritown_0-1691660052902.png

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

Thank you so much.  I was able to get that formula to work exactly how I needed it to.  Awesome!

 

I do have another question.  I have three other Topics that would follow the same ruleHow can I add additional Topics to the fomula. 

VAR MainAddendum = IF ( 'Help Requests'[Topic] = "TeamConnect>Performance/Slow/Freezing", 2, 1)

Like that:

VAR MainAddendum = IF ( 'Help Requests'[Topic] IN { "TeamConnect>Performance/Slow/Freezing", "Topic 2", "Topic 3" }, 2, 1)

 

johnt75
Super User
Super User

Have a look at https://www.youtube.com/watch?v=2HkBbqxBzF0 from SQLBI.

Thank you.  This was very helpful as well.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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