Forum Discussion
Fund Balance Comparison by Year Formulas
I am trying to map out fund balances overtime and I have the following formula:
2 Replies
- amitchandak
Super User
Anonymous , Assume you have fund balance column date wise of year start date wise
Then you can have a measure
calculate(firstnonblankvalue('Date'[Date], sum('Fund Balances'[Year Cash Balance])) , filter(all('Date'), 'Date'[Year] = max('Date'[Year]) ))
Else you need use Switch
Switch(Year(Max('Date'[Date])),
2022, 'Fund Balances'['22 Beginning Year Cash Balance]),
2021, 'Fund Balances'['21 Beginning Year Cash Balance]),
2020, 'Fund Balances'['20 Beginning Year Cash Balance])
)
Rest is what you are doing or follow
Power BI Inventory On Hand
Power BI Inventory On Hand: https://youtu.be/nKbJ9Cpb-Aw - AnonymousNot applicable
My fund balances are not its own column rather it a measure. The thing that is holding it up is I want to have it calculate where it is differentiating by the year. So if the year is'21 it is using the beg '21 balance to calculate a rolling total based on date for that year. I guess my question is how can I combine the following three formulas:
'20 Running Fund Balance: =CALCULATE(TOTALYTD([2020 Actuals :], '0. Calendar'[Date]) + 'Fund Balances'['20 Beginning Year Cash Balance])'21 Running Fund Balance: =CALCULATE(TOTALYTD([2021 Actuals :], '0. Calendar'[Date]) + 'Fund Balances'['21 Beginning Year Cash Balance])'22 Running Fund Balance: =CALCULATE(TOTALYTD([2022 Actuals :], '0. Calendar'[Date]) + 'Fund Balances'['22 Beginning Year Cash Balance])To appear in a list where I can use time intelligence to create charts. because by using this formulaRunning Fund Balances =CALCULATE([Rev - Exp],FILTER(ALLSELECTED('0. Calendar'[Month Sort]),ISONORAFTER('0. Calendar'[Month Sort], MAX('0. Calendar'[Month Sort]), DESC))) + 'Fund Balances'['22 Beginning Year Cash Balance]It is adding '22 to '21 which is what I dont want. Would it help to share file? The end goal is to show clustered column chart to show historial ending fund balances year vs year.