Forum Discussion
Get Last Values from a Table
- 1 year ago
Create a Calculated Column to Identify the Latest Record:
LatestRecord =
RANKX(
FILTER(
TableName,
TableName[accountid] = EARLIER(TableName[accountid]) &&
TableName[attribute] = EARLIER(TableName[attribute])
),
TableName[createdon],
,
DESC
)Then, you can create a filtered table or measure to get only the latest records where the rank is 1.
LatestValuesTable =
FILTER(
TableName,
TableName[LatestRecord] = 1
)
Create a Calculated Column to Identify the Latest Record:
LatestRecord =
RANKX(
FILTER(
TableName,
TableName[accountid] = EARLIER(TableName[accountid]) &&
TableName[attribute] = EARLIER(TableName[attribute])
),
TableName[createdon],
,
DESC
)
Then, you can create a filtered table or measure to get only the latest records where the rank is 1.
LatestValuesTable =
FILTER(
TableName,
TableName[LatestRecord] = 1
)