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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 6 | |
| 6 | |
| 6 |