Forum Discussion
Measure based on latest date
- 2 years ago
Hi M_SBS_6 ,
You can use either measure or calculated column ,
Measure :LatestDateValueSum = CALCULATE( SUM('Table'[Value]), FILTER( 'Table', 'Table'[Date] = MAX('Table'[Date]) )or
Create a calculated column to rank the dates so you can identify the latest date:
DateRank =
RANKX(
ALL('Table'[Date]),
'Table'[Date],
,
DESC,
DENSE
)
Create a measure to sum the values for the latest date by filtering the data based on the rank:
LatestDateValueSum =
CALCULATE(
SUM('Table'[Value]),
FILTER(
'Table',
'Table'[DateRank] = 1
)
)
Hi M_SBS_6 ,
You can use either measure or calculated column ,
Measure :
LatestDateValueSum =
CALCULATE(
SUM('Table'[Value]),
FILTER(
'Table',
'Table'[Date] = MAX('Table'[Date])
)
or
Create a calculated column to rank the dates so you can identify the latest date:
DateRank =
RANKX(
ALL('Table'[Date]),
'Table'[Date],
,
DESC,
DENSE
)
Create a measure to sum the values for the latest date by filtering the data based on the rank:
LatestDateValueSum =
CALCULATE(
SUM('Table'[Value]),
FILTER(
'Table',
'Table'[DateRank] = 1
)
)