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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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