Forum Discussion
Cazuc
2 years agoFrequent Visitor
Take the last Row per category
Hello everyone! First of all, I want to apolgize because of my English, because I am not a native speaker. I have spending so much time trying to transform this: Timestamp User Tag Set...
- 2 years ago
Hi,
= Table.FromRecords(
Table.Group(
Prev_Step,
{"Tag"},
{{"Data", each Table.Max(_,"Timestamp"), type record}}
)[Data]
)Stéphane
slorin
Super User
2 years agoHi,
= Table.FromRecords(
Table.Group(
Prev_Step,
{"Tag"},
{{"Data", each Table.Max(_,"Timestamp"), type record}}
)[Data]
)
Stéphane
Cazuc
2 years agoFrequent Visitor
Hi Stéphane,
First, I doubled the original table and I did what you posted:
= Table.Group (#"Prev. step", {"Tag"}, {{"New Column Name", each List.Max([Timestamp]), type nullable datetime}})
Then, I combined the new table with the previous one, with the common column "Timestamp". Then I expand the new merged table and selected the columns that I need (user and SetReset).
If anyone has a better, more efficient way to do it I would be pleased to read.
Thank you Stéphane!