Forum Discussion
Anonymous
5 years agoNot applicable
How get the last value on a given date
Hi all. I have table: that false. Would like to see the remainder from 12885,82625 as of 04.12.2019 More samples as I want to see: I try next queries, but nothing correct work...
Anonymous
5 years agoNot applicable
lbendlin how to do it? Define filters as variable
lbendlin
5 years agoSuper User
Like you do it in your last example.
- Anonymous5 years agoNot applicable
lbendlin
So:
VAR LastBalanceDate = CALCULATE(MAX( 'Table1'[DateKey]))
RETURN
CALCULATE(
LASTNONBLANK('Table1[RemDoc],SUM('Table1'[RemDoc])),
'Date'[DateKey] <= LastBalanceDate)
Or so:
LASTNONBLANK(VALUES ('Table1'[RemDoc]),
VAR LastBalanceDate = CALCULATE(MAX( 'Table1'[DateKey]))
RETURN
CALCULATE(
SUM ('Table1'[RemDoc]),
'Date'[DateKey] <= LastBalanceDate))
both options don't work