Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
chandraismoon
Microsoft Employee
Microsoft Employee

How to get MAX date from two records to one record

Hi All,

 

I have a data set Having same values except date column

Ex:

ID                   changed date             category

1                     1/3/2020                     Bike

1                      3/3/2020                    Bike

2                     3/3/2020                     car

2                      4/3/2020                    car

 

In this I want the out put as 

ID                   changed date             category

1                      3/3/2020                    Bike

2                      4/3/2020                    car

 

How can I achieve it 

 

Please help

 

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @chandraismoon ,

 

Try to create a measure for date column:

Max_date = 
CALCULATE(
    MAX([changed date]),
    ALLEXCEPT(
        'Sheet1 (2)',
        'Sheet1 (2)'[ID], 'Sheet1 (2)'[category]
    )
) 

dd5.PNG

Finally, you can change the data format

dd6.PNG

 

Best regards,
Lionel Chen

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

2 REPLIES 2
v-lionel-msft
Community Support
Community Support

Hi @chandraismoon ,

 

Try to create a measure for date column:

Max_date = 
CALCULATE(
    MAX([changed date]),
    ALLEXCEPT(
        'Sheet1 (2)',
        'Sheet1 (2)'[ID], 'Sheet1 (2)'[category]
    )
) 

dd5.PNG

Finally, you can change the data format

dd6.PNG

 

Best regards,
Lionel Chen

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

niteshtrehan89
Helper III
Helper III

Hi chandraismoon,

 

We can write the DAX function to get the max date by grouping the categories.

 

test = CALCULATE(MAX(Test[Changed Date]),GROUPBY(Test,Test[Category]))

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors