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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Issue with Circular Dependency! Need Help!

Hello Team,

 

I am trying to create a couple of measures and running into a circular dependency, the measures are as below:

Remaining = Start of Day - (sum of all tickets closed that day)

Start of Day = Added + Previous Day Remaining

Added is the new tickets received per day.

I am using a Direct Query mode as per the requirement.

Please let me know of a way to mitigate this issue!

 

Thanks in advance!

2 REPLIES 2
amitchandak
Super User
Super User

Make sure you have a date table in your database, Mark that as the date table in Power BI. Then these formulae can be used for today and yesterday

 

Day behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Day))
Today  = CALCULATE(SUM(Sales[Sales Amount]),filter('Date','Date'[Date]=Today())
// Today  = CALCULATE(SUM(Sales[Sales Amount]),today())

Please refer my blog on the direct query to check more on the date table

https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-1-Time-Intell...

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

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

Hi @amitchandak ,

 

Thanks for your response, but i am unsure how this can be applied in my scenario. As mentioned, my Start of Day measure and Remaining measure are interdependent and causing a circular dependency

 

Start of Day = Added Today + Previous Day Remaining 

Remaining = Start of Day(various other metrics)

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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