Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi Everyone!
I have a table like the one below with IDs that correspond to a specific person and dates of observation. I am wondering how to create the Timepoint column in bold below. I want to label the first, second, third, etc observation for each person based on the date field. Any ideas?
| ID | Date | Timepoint |
| 123 | 1/1/2023 | 2 |
| 546 | 2/3/2023 | 1 |
| 876 | 12/13/2022 | 1 |
| 123 | 5/8/2021 | 1 |
| 876 | 6/1/2023 | 2 |
Solved! Go to Solution.
hi, @eHorizons
let
Source = table_like_the_one_below,
gr = Table.Group(
Source, "ID",
{{"points", each Table.AddIndexColumn(Table.Sort(_, "Date"), "Timepoint", 1, 1)}}
),
expand = Table.ExpandTableColumn(gr, "points", {"Date", "Timepoint"})
in
expand
@eHorizons You can create the Timepoint column in Power Query.
If you want to label the observations in reverse order (i.e., the most recent observation labeled as 1), you can sort the table by ID and Date in descending order before performing the Group By operation.
NOTE: You can also archive the same result using a DAX Measure:
Timepoint = RANKX(FILTER(ALL('Table'), 'Table'[ID] = EARLIER('Table'[ID]) && 'Table'[Date] <= EARLIER('Table'[Date])), 'Table'[Date], , ASC)
hi, @eHorizons
let
Source = table_like_the_one_below,
gr = Table.Group(
Source, "ID",
{{"points", each Table.AddIndexColumn(Table.Sort(_, "Date"), "Timepoint", 1, 1)}}
),
expand = Table.ExpandTableColumn(gr, "points", {"Date", "Timepoint"})
in
expand
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 14 | |
| 12 | |
| 10 | |
| 7 | |
| 6 |