Forum Discussion
Sum last non blank value
- 4 years ago
Hi, Anonymous
You can try the following methods.
Calculated column:
Last non blank date = CALCULATE ( MAX ( [Date] ), FILTER ( 'Table', [Source] = EARLIER ( 'Table'[Source] ) && NOT ( ISBLANK ( [Total Asset] ) ) ) )Sum = CALCULATE ( SUM ( 'Table'[Total Asset] ), FILTER ( 'Table', [Date] = [Last non blank date] ) )Measure:
Last non blank date M = CALCULATE ( MAX ( [Date] ), FILTER ( ALL('Table'), [Source] = MAX( 'Table'[Source] ) && NOT ( ISBLANK ( [Total Asset] ) ) ) )Sum M = CALCULATE ( SUM ( 'Table'[Total Asset] ), FILTER ( ALL ( 'Table' ), [Date] = [Last non blank date M] ) )Use the field "Last non blank date" to avoid the problem of taking the maximum value of "Total Asset" instead of the last non blank value.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
You can try the following methods.
Calculated column:
Last non blank date =
CALCULATE (
MAX ( [Date] ),
FILTER (
'Table',
[Source] = EARLIER ( 'Table'[Source] )
&& NOT ( ISBLANK ( [Total Asset] ) )
)
)
Sum =
CALCULATE (
SUM ( 'Table'[Total Asset] ),
FILTER ( 'Table', [Date] = [Last non blank date] )
)
Measure:
Last non blank date M =
CALCULATE (
MAX ( [Date] ),
FILTER (
ALL('Table'),
[Source] = MAX( 'Table'[Source] )
&& NOT ( ISBLANK ( [Total Asset] ) )
)
)Sum M =
CALCULATE (
SUM ( 'Table'[Total Asset] ),
FILTER ( ALL ( 'Table' ), [Date] = [Last non blank date M] )
)
Use the field "Last non blank date" to avoid the problem of taking the maximum value of "Total Asset" instead of the last non blank value.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.