Forum Discussion
tokhir
1 year agoFrequent Visitor
Get last non blank value ordered by date
I have two column: Date and Amount columns Date 01.11.2024 02.11.2024 03.11.2024 04.11.2024 05.11.2024 06.11.2024 07.11.2024 08.11.2024 09.11.2024 10.11.2024 Am...
- Anonymous1 year ago
Hi tokhir ,
You can create a measure as below to get it:
Last non blank value = VAR _maxdate = CALCULATE ( MAX ( 'Table'[Date] ), FILTER ( 'Table', NOT ( ISBLANK ( 'Table'[Amount] ) ) ) ) RETURN CALCULATE ( MAX ( 'Table'[Amount] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = _maxdate ) )Best Regards
tokhir
1 year agoFrequent Visitor
got it. Is it possible to get the latest value using simple dax? Or do I need to use a slightly complex query using date?
SachinNandanwar
Impactful Individual
1 year agoTry something like this
Meausre =
CALCULATE(
SUM(Table[Amount]),
LASTNONBLANK(Table[Date], SUM(Table[Amount]))
)