Forum Discussion

kendomino's avatar
kendomino
Regular Visitor
1 year ago

How to filter a visual to only show the latest rows based on dataLake_CreatedTime

Body:
I’m working with a snapshot table in Power BI that refreshes frequently. The table has multiple rows for the same record ID, each with a different dataLake_CreatedTime (datetime) showing when that snapshot was created.

What I need:

  • For any given record ID, my visual should only show the row(s) with the most recent dataLake_CreatedTime.

  • If there are multiple records tied for the latest timestamp, I only want one of them shown in the visual.

Details:

  • Table name: api_openreqs

  • Key fields:

    • JobReq_JobReqID (text) — may contain duplicates because of multiple snapshots

    • dataLake_CreatedTime (datetime) — snapshot creation timestamp

  • Goal: Limit visuals to one latest row per JobReq_JobReqID based on the maximum dataLake_CreatedTime.

What I’ve tried:

  • Using MAX in a measure to find the latest date per ID

  • Creating a calculated column to flag the latest row

  • Running into issues with ties and overcounting

Question:
What’s the best way (measure, calculated column, or Power Query transformation) to configure my data so that visuals always filter to only the latest rows based on dataLake_CreatedTime? 

3 Replies