Forum Discussion
NilR
5 years agoPost Patron
Create Automated Date Range
What is the best way to create below case statement in PBI? I do not want to hard code the date range. Would like to autmate the green font. CASE
WHEN DATE BETWEEN '2020-01-01' AND '2020-...
- 5 years ago
NilR Perhaps just set the display format for the DATE column to month and year, it's a default option under Column Tools when you have a date column.
smpa01
5 years agoCommunity Champion
new column= SWITCH(TRUE(),
[Column1]>=DATE(2021,1,1)&&[Column1]<=DATE(2021,1,31),"jan",
[Column1]>=DATE(2021,2,1)&&[Column1]<=DATE(2021,2,28),"feb",
............................................................
[Column1]>=DATE(2021,12,1)&&[Column1]<=DATE(2021,12,31),"dec",
"others")