Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I'm having trouble with an additive formula to calculate a running cash total. I have an opening cash measure that looks up the opening cash balance for that month in an Opening Cash table. For the first month I simply need to add Opening Cash + Operating Revenue + Operating Expenses to find the End Balance. I'm having trouble getting the End Balance from Month 1 to carry over as a Beginning Balance in Month 2 and so on.
Below is my current matrix visual, missing the Beginnning Balance measure, a breakdown of the measures, and a sample of the data and structure. I would appreciate any help. I've gotten close but keep running into circular reference errors.
Solved! Go to Solution.
Hi @jburklund ,
Ending cash should be the cumulative cash balance at monthend just like any other real account in the balance sheet. Try this:
ending cash =
CALCULATE (
[opening cash] + [operating revenue] - [operating expenses],
FILTER ( ALL ( dates ), dates[date] <= MAX ( dates[date] ) )
)
The measure above makes use of a separate dates table. If you don't have one, you can create by using DISTINCT(facttable[Date]) and then create one to many single direction relationship from this Dates table to your fact table.
If this doesn't answer your question, as always, please provide workable sample data (not an image) and your expected result from that. You may post post a link to an Excel file hosted in the cloud (dropbox, g/onedrive, etc.) Please refer to this post on how to get your question answered faster https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/td-p/144...
Proud to be a Super User!
Hi @jburklund ,
Ending cash should be the cumulative cash balance at monthend just like any other real account in the balance sheet. Try this:
ending cash =
CALCULATE (
[opening cash] + [operating revenue] - [operating expenses],
FILTER ( ALL ( dates ), dates[date] <= MAX ( dates[date] ) )
)
The measure above makes use of a separate dates table. If you don't have one, you can create by using DISTINCT(facttable[Date]) and then create one to many single direction relationship from this Dates table to your fact table.
If this doesn't answer your question, as always, please provide workable sample data (not an image) and your expected result from that. You may post post a link to an Excel file hosted in the cloud (dropbox, g/onedrive, etc.) Please refer to this post on how to get your question answered faster https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/td-p/144...
Proud to be a Super User!
Thank you! This worked great.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
89 | |
86 | |
79 | |
69 | |
68 |
User | Count |
---|---|
226 | |
129 | |
119 | |
83 | |
77 |