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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
KyawMyoTun
Helper IV
Helper IV

Summarize based on ID and Name with Min Date of Entire Dataset

Dear Experts,

  I am trying to summarize the columns based on ID and Name with Min Date.
Here is my data,

IDNameDate
1111KMT6/1/2023
1111KMT6/2/2023
1112MMT6/2/2023
1112KKT6/2/2023

I tried with the summarize function as below dax

Ticket =
COUNTROWS(SUMMARIZE(Sheet1,Sheet1[ID],Sheet1[Name],"Min Dt", MIN(Sheet1[Date])))
As ID 1111 and Name KMT is duplicate, I would like to count as only 1 at the 6/1/2023(do not want to count at 6/2/2023).
So, my expected result will be,
Day Total Count
6/1/2023 1

6/2/2023              2
even after selecting from slicer.
Please help me to correct my dax funtion.

Regards,
KMT

 

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @KyawMyoTun You can use the following DAX expression

 

Ticket =
COUNTROWS(
SUMMARIZE(
FILTER(
Sheet1,
[Date] = CALCULATE(
MIN(Sheet1[Date]),
ALLEXCEPT(Sheet1, Sheet1[ID], Sheet1[Name])
)
),
Sheet1[ID],
Sheet1[Name],
"Min Dt", MIN(Sheet1[Date])
)
)

 

The above expression should give you the expected result where duplicates are counted only once for each unique combination of ID and Name, based on the minimum date.

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
rajendraongole1
Super User
Super User

Hi @KyawMyoTun You can use the following DAX expression

 

Ticket =
COUNTROWS(
SUMMARIZE(
FILTER(
Sheet1,
[Date] = CALCULATE(
MIN(Sheet1[Date]),
ALLEXCEPT(Sheet1, Sheet1[ID], Sheet1[Name])
)
),
Sheet1[ID],
Sheet1[Name],
"Min Dt", MIN(Sheet1[Date])
)
)

 

The above expression should give you the expected result where duplicates are counted only once for each unique combination of ID and Name, based on the minimum date.

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Dear @rajendraongole1 ,
 This works perfectly. Thanks a lot for your help.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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