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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.