Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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/
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
10 | |
7 |