Forum Discussion
Take latest data conditional on source
- 4 years ago
Hi Javierco
You may try this Measure.
SumOfLatestRecords = VAR LatestDate = ADDCOLUMNS ( 'Table', "latest", CALCULATE ( LASTDATE ( 'Table'[date] ), ALLEXCEPT ( 'Table', 'Table'[source] ) ) ) RETURN CALCULATE ( SUM ( 'Table'[qty] ), FILTER ( LatestDate, 'Table'[date] = [latest] ) )Then, the result will look like this.
Also, attached the pbix file as reference.
Best Regards,
Community Support Team _ Caiyun
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Hi Javierco
You may try this Measure.
SumOfLatestRecords =
VAR LatestDate =
ADDCOLUMNS (
'Table',
"latest", CALCULATE ( LASTDATE ( 'Table'[date] ), ALLEXCEPT ( 'Table', 'Table'[source] ) )
)
RETURN
CALCULATE (
SUM ( 'Table'[qty] ),
FILTER ( LatestDate, 'Table'[date] = [latest] )
)
Then, the result will look like this.
Also, attached the pbix file as reference.
Best Regards,
Community Support Team _ Caiyun
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!