Reply
Member
Posts: 325
Registered: ‎12-04-2017
Accepted Solution

Using earliest and latest dates

I have this table:

1.PNG

I currently cannot establish a relationship to this table because of duplication. How can I transform this into one record using the earliest start date (1/1/2017) and the latest enddate (12/31/2100)?


Accepted Solutions
Highlighted
Community Support Team
Posts: 7,295
Registered: ‎05-02-2017

Re: Using earliest and latest dates

Hi @mrainey,

 

Please download the solutions from the attachment. You can achieve it either by Power Query or by DAX.

1. Using Power Query "Group by" function.

2. DAX.

Table =
SUMMARIZE (
    'Table2',
    Table2[Co],
    "startDate", MIN ( 'Table2'[startDate] ),
    "endDate", MAX ( 'Table2'[endDate] )
)

using-earliest-and-latest

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Attachment

All Replies
Highlighted
Community Support Team
Posts: 7,295
Registered: ‎05-02-2017

Re: Using earliest and latest dates

Hi @mrainey,

 

Please download the solutions from the attachment. You can achieve it either by Power Query or by DAX.

1. Using Power Query "Group by" function.

2. DAX.

Table =
SUMMARIZE (
    'Table2',
    Table2[Co],
    "startDate", MIN ( 'Table2'[startDate] ),
    "endDate", MAX ( 'Table2'[endDate] )
)

using-earliest-and-latest

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Attachment