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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
bzafft123
Regular Visitor

Filter table by column then on filter value increase date by 14 days all in 1 new column

Hello,

 

I have a table with the following columns Profit Center, Requested Date, and Target Delivery Date. I'm looking for the Target Delivery Date to be updated by i.e. 14 days if Profit Center is Preschool or if Profit Center is Schools 30 days. I want these updates all in one new column.  

Example: Preschool(Profit Center)  | 1/7/2020 (requested Date) | "new column" = 1/21/2020 (14 days added)

bzafft123_0-1678385734796.png

Please let me know if you need additional information.

1 ACCEPTED SOLUTION

hi @bzafft123 

try like:

new column =
SWITCH(
   [Profit Center],
   "Preschool", [Requested Date]+14,
    [Requested Date]+30
)

View solution in original post

4 REPLIES 4
bzafft123
Regular Visitor

@FreemanZ Its in my example: Example: Preschool(Profit Center)  | 1/7/2020 (requested Date) | "new column" = 1/21/2020 (14 days added

Preschool = add 14 days

Studios = add 30 days

etc.

hi @bzafft123 

try like:

new column =
SWITCH(
   [Profit Center],
   "Preschool", [Requested Date]+14,
    [Requested Date]+30
)

That worked! Thank you so much!

FreemanZ
Super User
Super User

hi @bzafft123 

could provide the value of your expected new column directly? It would be easier for all.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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