This functions provides native support for doing balances, e.g. for onhand inventory or general ledger balances. CloseBal returns the closing balance – which is the sum of the measure since beginning of time including "todays" transactions.
Syntax:
SUM(CLOSEBAL(measure,[DateColumnName]))
Note: In case there are no transactions for a specific date the date will be excluded from the output. See also: OPENBAL.
Example:
SUM(CLOSEBAL(measure,[DateColumnName]))