Forum Discussion
Help with filters
- 6 years ago
dax Anonymous ,
I was able to fix my problem by modifying the IsLastMonth calculated column as follows:
Old Value:
IsLastMonth = if Date.Month([#"FullDate"]) < (Date.Month(DateTime.LocalNow()) then "Y" else "N"
New Value:
IsLastMonth = if (Date.Month([#"FullDate"]) < (Date.Month(DateTime.LocalNow()))) or (Date.Year([#"FullDate"]) < (Date.Year(DateTime.LocalNow())))
then "Y" else "N"This allowed the whole 2019 to be past month and January for 2020.
Thank you
Glen
I have this on my report, but for some reason, it shows only January for both 2020 and 2019. I wanted to be able to display the whole months of 2019, and only January for 2020.
Thanks
Glen
dax Anonymous ,
I was able to fix my problem by modifying the IsLastMonth calculated column as follows:
Old Value:
IsLastMonth = if Date.Month([#"FullDate"]) < (Date.Month(DateTime.LocalNow()) then "Y" else "N"
New Value:
IsLastMonth = if (Date.Month([#"FullDate"]) < (Date.Month(DateTime.LocalNow()))) or (Date.Year([#"FullDate"]) < (Date.Year(DateTime.LocalNow())))
then "Y" else "N"
This allowed the whole 2019 to be past month and January for 2020.
Thank you
Glen