Forum Discussion
arobinson
5 years agoFrequent Visitor
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)))
How about Date = WEEKNUM ( Goals[Week] ) - 1?
1 Reply
- AlexisOlsonSuper User
How about Date = WEEKNUM ( Goals[Week] ) - 1?