Forum Discussion

arobinson's avatar
arobinson
Frequent Visitor
5 years ago
Solved

If Statement to a VAR

I am working through building a table and will have a few different columns with variables that will be Date dependant. 

 

Anyway to shrink up this formula or make it  faster? 

 

Date =
IF (AND ( Goals[Week] >= DATE ( 2021, 1, 3 ), Goals[Week] <= DATE ( 2021, 1, 9 ) ),1,
IF (AND ( Goals[Week] >= DATE ( 2021, 1, 10 ), Goals[Week] <= DATE ( 2021, 1, 16 ) ),2,
IF (AND ( Goals[Week] >= DATE ( 2021, 1, 17 ), Goals[Week] <= DATE ( 2021, 1, 23 ) ),3)))