Forum Discussion
Anonymous
3 years agoNot applicable
Circular dependency
I have a month column. No date only month. I then created a Month Number. Month Number = SWITCH('Account Changes 2016-2022'[Month], "January",1, "February",2, "March",3, "April",4, "May",5, ...
- 3 years ago
One way to solve this is to add the Month Number column in the query editor instead of DAX.
You can do this with a custom column like this:
Date.Month(Date.From(([Month] & " 2000")))(Appending the " 2000" allows it to interpret e.g. "January 2000" as a date and then compute the month number for that date.)
AlexisOlson
3 years agoSuper User
One way to solve this is to add the Month Number column in the query editor instead of DAX.
You can do this with a custom column like this:
Date.Month(Date.From(([Month] & " 2000")))
(Appending the " 2000" allows it to interpret e.g. "January 2000" as a date and then compute the month number for that date.)