Forum Discussion
ingpiolo
3 years agoFrequent Visitor
calculation using Previous value empty
Hi everyone, I have a table like this: I should calculate subsequent fields as indicated iteratively by associating a measure (Filled fields are final values while empty ones are an estima...
Anonymous
2 years agoNot applicable
Hi ingpiolo ,
I created a sample pbix file(see the attachment), please find the details in it.
Result =
VAR _seldate =
SELECTEDVALUE ( 'Table'[Date] )
VAR _maxdate =
CALCULATE (
MAX ( 'Table'[Date] ),
FILTER ( ALLSELECTED ( 'Table' ), [Sum of value] > 0 )
)
VAR _value =
SUMX (
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = _maxdate ),
[Sum of value]
)
VAR _measures =
CALCULATE (
SUM ( 'Table'[Measure] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] <= _seldate )
)
RETURN
IF (
ISBLANK ( SELECTEDVALUE ( 'Table'[Measure] ) ),
BLANK (),
_value + _measures
)
Best Regards
ingpiolo
2 years agoFrequent Visitor
thanks a lot for the support.
I tried but unfortunately I didn't succeed. I am attaching the file to clarify my situation.
Thanks for your support
https://drive.google.com/file/d/15fXdGIKlAwNIQbEWUGQow9kBN0DCmZZm/view?usp=drive_link