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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RashmitaR
Helper IV
Helper IV

circular dependency detected

Hi I was trying to categorize ageing number of days into two types i.e >30 and <30 . ageing is calculated on the basis of the month selected in the filter if we are filtering to current month then

ageing number of days = current date - approved date {approved date being a column in my dataset}

else

ageing number of days = last date of the selected month - approved date

 

i have created the following measures 

Last_Date = EOMONTH([TIME_ID_DATE],0)........{calculated column}

 

Last_day_of_month = CALCULATE(LASTDATE(D_TIME_PERIOD[Last_date]),ALLEXCEPT(D_TIME_PERIOD,D_TIME_PERIOD[YEAR],D_TIME_PERIOD[MONTH])) .................{calculated measure}

 

Ageing_number_of_days = If(MONTH([Last_day_of_month])=[this.month],DATEDIFF(F_RR_DETAIL[D_APPROVED_DATE],TODAY(),DAY),DATEDIFF([D_APPROVED_DATE],[Last_day_of_month],day)).............{calculated column}

 

 

ageing.PNG

3 REPLIES 3
wonga
Continued Contributor
Continued Contributor

@RashmitaR

 

Is this DAX statement for a measure or column? Try making a new column using DAX instead.

 

Right click your table/dataset and click "New Column" instead of "New Measure".

Baskar
Resident Rockstar
Resident Rockstar

Hi Rashmita,

 

I suggest u y not create a "Conditional column  " from Query Editor.

 

Let u try

v-sihou-msft
Employee
Employee

@RashmitaR

 

As the error message indicated, your have circular dependency between measure: Ageing_number_of_days and column:F_PR_DETAIL[Column]. Please check the expression of this calculated measure, it supposes to have [Ageing_number_of_days] referenced in its expression which causes the error. Please refer to article below to understand this error:

 

https://www.sqlbi.com/articles/understanding-circular-dependencies/

 

Regards,

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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