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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
daxnoob
Frequent Visitor

Include the min Date in Summarize

Hi, Is it possible to include the distinct min date value in a summarize measure?

Here is my code:

Countx(
         Summarize(
                 'Table',
                 'Table'[Name],

                 min('Table'[Date]),
                 'Table'[Age]),
         [Measure]
)

Obviously, this won't work but the table is set up where there can be multiple dates for each distinct name and I'm only trying to group each column with the minimum date value. Is that possible?

Thank you.

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

Is this what you are looking for?

 

 

Countx( FILTER(
         Summarize(
                 'Table',
                 'Table'[Name],
                 'Table'[Date])
                 'Table'[Age]),'Table'[Date]=min('Table'[Date])),
         [Measure]
)
----------
or
Countx( FILTER(
         Summarize(
                 'Table',
                 'Table'[Name],
                 'Table'[Date])
                 'Table'[Age]),'Table'[Date]=STARTOFMONTH('Table'[Date],0)),
         [Measure]
)

 

 

View solution in original post

2 REPLIES 2
Ahmedx
Super User
Super User

Is this what you are looking for?

 

 

Countx( FILTER(
         Summarize(
                 'Table',
                 'Table'[Name],
                 'Table'[Date])
                 'Table'[Age]),'Table'[Date]=min('Table'[Date])),
         [Measure]
)
----------
or
Countx( FILTER(
         Summarize(
                 'Table',
                 'Table'[Name],
                 'Table'[Date])
                 'Table'[Age]),'Table'[Date]=STARTOFMONTH('Table'[Date],0)),
         [Measure]
)

 

 

ryan_mayu
Super User
Super User

could you pls provide the sample data and expected output?





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

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.