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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

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