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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Guys,
I hope you all are doing well.
I had a quick question about the start and end date - It may be the simple one, But I can't find the solution.
I had a table with names and dates as follows below.
Names | Years |
David | 2018 |
David | 2019 |
David | 2020 |
Peter | 2019 |
Peter | 2020 |
Alex | 2020 |
Alex | 2021 |
Alex | 2022 |
From the above table, I want to extract only the start year and end year
Output needs to look like
Names | Start Year | End Year |
David | 2018 | 2020 |
Peter | 2019 | 2020 |
Alex | 2020 | 2022 |
Any help can be appreciated - Thanks, and looking forward to the solution.
HI @Anonymous
If you need a new table, then use this code to create a table:
New Table =
SUMMARIZE (
'Table',
'Table'[Names],
"Start Year", MIN ( 'Table'[Years] ),
"End Year", MAX ( 'Table'[Years] )
)
File with all solutions attached.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new table.
Hi @Anonymous
You can use below measures:
Start Year = MIN (Table[Years])
End Year = MAX (Table[Years])
then create a table and add Names, Start Year, and End Year to the table.
On the other hand, without measures, you can add Years column to the table with Min and Max aggregation.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/