cancel
Showing results for
Did you mean:
Helper II

## If Statements with Between Dates multi conditions

Hello,

I would like to write a formula in a column that says:

IF(Open_Date, between 2021-01-01 and 2020-07-31 then 0%,

IF(Open_Date, between 2022-08-01 and 2022-12-31 then 2% * 1,
IF(Open_Date, between 2023-01-01 and 2023-31-12 then 3% * 1

Would anyone be able to assist me please?

Thanks,
D

2 ACCEPTED SOLUTIONS
Super User

@Kryssy I would try something like this:

``````Column =
SWITCH(TRUE(),
[Open_Date] >= DATE(2020,7,31) && [Open Date] <= DATE(2021,1,1),0,
[Open_Date] >= DATE(2022,8,1) && [Open Date] <= DATE(2022,12,31),.02*1,
[Open_Date] >= DATE(2023,1,1) && [Open Date] <= DATE(2023,12,31),.03*1
)
``````

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Helper II

@Greg_Deckler  THANK YOU!!!!

2 REPLIES 2
Super User

@Kryssy I would try something like this:

``````Column =
SWITCH(TRUE(),
[Open_Date] >= DATE(2020,7,31) && [Open Date] <= DATE(2021,1,1),0,
[Open_Date] >= DATE(2022,8,1) && [Open Date] <= DATE(2022,12,31),.02*1,
[Open_Date] >= DATE(2023,1,1) && [Open Date] <= DATE(2023,12,31),.03*1
)
``````

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Helper II

@Greg_Deckler  THANK YOU!!!!

Announcements

#### Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

#### Power BI March 2023 Update

Find out more about the March 2023 update.

#### March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors
Top Kudoed Authors