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

Circular calculation

Hello,

 

New to PowerBI and I'm trying to do a circular calculation to determine the amount of budget remaining after expenses are taken. In Excel, this is what I'm looking to accomplish:

tlh_0-1619711396741.png

 

I've found a few other posts to similar things

https://community.powerbi.com/t5/Desktop/Circular-reference-calculation/td-p/213415

https://community.powerbi.com/t5/Desktop/Circular-Dependency-on-Calculated-Columns/m-p/1253826#M5526...

 

But I haven't been able to understand exactly how the measures are working. 

 

Any help is appricated, and extra point if you can explain the solution like im 5yo.

The output will be used in a burndown-style chart to see how the budget is trending.

 

TIA,

Trent

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

 Hi, @tlh 

To create 2 measures to achieve it:

_Total_Budget = 1700000

This measure indicates how much the total budget is, and you can change it to suit your needs.

Then, to create a calculate column below:

Remaining =
[_Total_Budget]
    - CALCULATE (
        SUM ( 'Table'[Expense] ),
        FILTER ( 'Table', [Date] <= EARLIER ( [Date] ) )
    )

Result:

v-angzheng-msft_0-1620091447482.jpeg

Please refer to the attachment below for details

 

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-angzheng-msft
Community Support
Community Support

 Hi, @tlh 

To create 2 measures to achieve it:

_Total_Budget = 1700000

This measure indicates how much the total budget is, and you can change it to suit your needs.

Then, to create a calculate column below:

Remaining =
[_Total_Budget]
    - CALCULATE (
        SUM ( 'Table'[Expense] ),
        FILTER ( 'Table', [Date] <= EARLIER ( [Date] ) )
    )

Result:

v-angzheng-msft_0-1620091447482.jpeg

Please refer to the attachment below for details

 

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@tlh , I assuming  you only have one entry of budget

 

calculate( sum(Table[Budget]) , all(Table)) - calculate(sum(Table[expense]), filter(allselected(Table), Table[Date] <= max(Table[Date])))

 

if they these are from different table please use Date table

 

calculate( sum(Table[Budget]) , all(Date)) - calculate(sum(Table[expense]), filter(allselected(Date), Date[Date] <= max(Date[Date])))

 

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.