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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pdoak
Frequent Visitor

Date Circular Dependency

I have a budget file which contains monthly information and a dates table. 

 

I want to create another table which contains the daily budget information. I have used the following formula to generate that table:

 

CALCULATETABLE(
ADDCOLUMNS(
CROSSJOIN(
	SUMMARIZE(
		'Budget New',
		'Budget New'[gle_departmentHelper],
		'Budget New'[calcDepartment Helper],
		'Budget New'[Category Helper],
		'Budget New'[Item Category],
		'Budget New'[Item Type]
		 
		),
		SELECTCOLUMNS(FILTER(Dates, Dates[Year]=2023),Dates[Date], Dates[Year-Month])
		),
		"@Gross Month budget",CALCULATE([Budget Gross Order], REMOVEFILTERS(Dates[Date])),
		"@Net Month budget",CALCULATE([Budget Net Orders], REMOVEFILTERS(Dates[Date])),
		"@Days in Month", CALCULATE(COUNTROWS( Dates ), REMOVEFILTERS(Dates[Date]), Dates[Day of Week]<>1),
		"@Gross Daily Budget", DIVIDE(cALCULATE([Budget Gross Order], REMOVEFILTERS(Dates[Date])),CALCULATE(COUNTROWS( Dates ), REMOVEFILTERS(Dates[Date]), Dates[Day of Week]<>1),0),
		"@Net Daily Budget", DIVIDE(cALCULATE([Budget Net Orders], REMOVEFILTERS(Dates[Date])),CALCULATE(COUNTROWS( Dates ), REMOVEFILTERS(Dates[Date]), Dates[Day of Week]<>1),0)
		),
		FILTER(Dates, Dates[Year]=2023)
		)

		

 

The summarize function gives me all the column combinations from the budget file with the selectcolumns then adding dates daily to the table. I can then calculate the daily budget by finding the total budget for the month and dividing it by the number of workdays in the month.

 

The code above creates the table exactly as I want but I then need to create relationships from the newly created budget table to my other tables. When I try and create a relationship between my date in the newly created budget table to the dates table, I get a circular dependency error.

 

I have read that this can be solved by using Allexcept but I am not sure where I should be using it.

1 REPLY 1
amitchandak
Super User
Super User

@pdoak , refer if this can help

 

Power BI Distributing/Allocating the Monthly Target(Convert to Daily Target): Measure ( Daily/MTD): https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Monthly-Target-...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.