Forum Discussion
MichelleLash
2 years agoNew Member
Initial / close balance doesnt seem right
Hi community, im new to PBI, and been trying to create an Inital/Close balance, but havent been able so far, here is a little example PBIX the basic are: Inital Balance (the day the report is ...
- 2 years ago
Hi MichelleLash if sale is outflow (it should be for balance logic) simply create new calculated column with if statement like on picture below and create simple measure of SUM for that new column.
SUM of column should give you balance, so slice and filter as you wish.
gmsamborn
2 years agoSuper User
Hi MichelleLash
I made changes to [Initial Balance] and [_MyFinBal] (my Final Balance).
Initial balance =
VAR thisdate = MAX( 'Table'[Date] )
VAR vsales =
CALCULATE(
[Inventory] + [Arrive] - [Sale],
REMOVEFILTERS( 'Table'[Date] ),
'Table'[Date] < thisdate
)
RETURN
vsales
_MyFinBal = [Initial balance] + [Inventory] + [Arrive] - [Sale]
I didn't change any other measures.
Let me know if you have any questions. I hope this helps.