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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (2,194)