Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not 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,
"June",6,
"July",7,
"August",8,
"September",9,
"October",10,
"November",11,
"December",12
)
I created a slicer with month name. But it was not in chronological order. I sorted the column by month number. But it gave me circular dependency error. How do I fix this?
I want to arrange month name in chronological order. 
Thank you
1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super 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.)

View solution in original post

2 REPLIES 2
ppm1
Solution Sage
Solution Sage

The suggestion to do it in the query editor is a good one. Otherwise, you have two DAX options:

1. If you have another Date column in that table, use that to generate the Month Number column.

2. First create a duplicate column with Month2 = 'Account Changes 2016-2022'[Month]. Then point your switch column to the new Month2 column.

 

Pat

Microsoft Employee
AlexisOlson
Super User
Super 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.)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.