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
ycbq999
Frequent Visitor

Circular Dependicy occur when creating a new table using calculated measure

I have a table that has two period comparision. 

 

ycbq999_0-1689613001713.png

 

Where 1M_Y2 and 3M_Y2 calculated using second filter

 

The formular is like below:

1M_Filtered = IF(ISFILTERED(Sales_Combined[Type]),CALCULATE(SUM(Sales_Combined[Quantity])),BLANK())
 
1M_Y2 = CALCULATE([1M_Filtered],ALL(Dates),USERELATIONSHIP(Comparision_Dates[Datekey],Sales_Combined[Completed Date]),Comparision_Dates[MonthName]==SELECTEDVALUE(Dates[MonthName]))
 
3M_Y2 = CALCULATE([1M_Filtered],all(Dates),USERELATIONSHIP(Comparision_Dates[Datekey],Sales_Combined[Completed Date]),DATESINPERIOD(Comparision_Dates[Datekey],ENDOFMONTH(DATEADD(Comparision_Dates[Datekey],0,MONTH)),-3,MONTH))
 
 
Now I want to use union and summarize to upviot these measures into one column.
 
So it could be like 
Year ,Month ,Location ,Category, Measures ,Values
2023,Jun,      AG,          WHS,       1M,           2575
2023,Jun,      AG,          WHS,       1M_Y2,      2766
2023,Jun,      AG,          WHS,       1M_YvY,     -6.91%
2023,Jun,      AG,          WHS,       3M,           9564
2023,Jun,      AG,          WHS,       3M_YvY,    -17.92
 
However, there is a circular depencey detected When I use this formula:
 
test_table2 = UNION(SUMMARIZE(Sales_Combined,Dates[Year],Sales_Combined[Completed Date],Month_All[Month],Sales_Combined[Category],Sales_Combined[Type],Sales_Combined[Manufacturer],"Measures","1M_Filtered","Values",Measures_1[1M_Y2 ]))
 
The error message is like this
 
ycbq999_3-1689613742158.png

 

I know generally what circular dependency is, but I still can not solve this issue. I can not get around using Sales_Combined[Completed Date] this column. anyhelp?

 

 

0 REPLIES 0

Helpful resources

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

June 2025 community update carousel

Fabric Community Update - June 2025

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