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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dears,
i need to extract the first and last date of postings on projects, i only need this information. I grouped by projects and date, and now i'd like to delete all dates between first and last posting. in case there is only 1 posting on a project, this posting should remain as first and last.
the desired result are that the blue outlined lines remain. i thought already about creating a tabel for max values and a second one for minimum values of the date. but i don't get the clue how to check if the project in one line is the same or different to the project in the next line.
Solved! Go to Solution.
Hello @casamontagna ,
Use Table.Group for this and select Min and Max for the Date-column .
Here a code example
let
Source = #table
(
{"Project","Date"},
{
{"A","43466"}, {"A","43467"}, {"A","43468"}, {"A","43469"}, {"B","43470"}, {"B","43471"}, {"B","43472"}, {"B","43473"}, {"B","43474"}, {"C","43475"},
{"C","43476"}, {"C","43477"}, {"C","43478"}
}
),
ToDate = Table.TransformColumns
(
Source,
{
{
"Date",
each Date.From(Number.From(_)),
type date
}
}
),
Group = Table.Group(ToDate, {"Project"}, {{"Min", each List.Min([Date]), type date}, {"Max", each List.Max([Date]), type date}})
in
GroupCopy paste this code to the advanced editor in a new blank query to see how the solution works.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello @casamontagna ,
Use Table.Group for this and select Min and Max for the Date-column .
Here a code example
let
Source = #table
(
{"Project","Date"},
{
{"A","43466"}, {"A","43467"}, {"A","43468"}, {"A","43469"}, {"B","43470"}, {"B","43471"}, {"B","43472"}, {"B","43473"}, {"B","43474"}, {"C","43475"},
{"C","43476"}, {"C","43477"}, {"C","43478"}
}
),
ToDate = Table.TransformColumns
(
Source,
{
{
"Date",
each Date.From(Number.From(_)),
type date
}
}
),
Group = Table.Group(ToDate, {"Project"}, {{"Min", each List.Min([Date]), type date}, {"Max", each List.Max([Date]), type date}})
in
GroupCopy paste this code to the advanced editor in a new blank query to see how the solution works.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
thank you so much, made my day!!!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!