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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Return Max Date based on column filter

I'm in need of some dax help. I have a table that contains 2 columns; Date & Event. I only want to see the date that is associated with a specific event. For example in the table below I only want to see the dates with the event that begin with "FM". 

 

DateEvent
7/12/2021FM Party
1/5/2020Corporate Event
5/6/2021FM Event
1/1/2022Event FM
2/5/2020Business FM
6/6/2021FM Meeting

 

Thank you for any assistance

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

If you can mark the first one as a solution just so that others can use it given your original post, that will allow better solution identification down the track. However, to get you the additional caveat item, you can use below:

 

Measure = 

VAR _1 = CALCULATE
( MAX ( TableTest[Column1] ) , LEFT ( TableTest[Column1] , 2 ) = "FM" )
RETURN
IF ( LEFT ( TableTest[Column1] , 2 ) <> "FM" , BLANK() , _1 )

 Hope this helps!

Theo

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

3 REPLIES 3
TheoC
Super User
Super User

Hi @Anonymous 

 

You can create a measure with the logic such as the following:

 

Measure = CALCULATE ( MAX ( TableTest[Column1] ) , LEFT ( TableTest[Column1] , 2 ) = "FM" )
 Adjust Column1 to 'TableName'[Event] and should be all good from there.
 

TheoC_0-1644273144631.png

Hope this helps!

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Anonymous
Not applicable

Thank you Theo - one more caviot, I need the other events to appear in the report as well, but they will show a blank value.

 

Thanks again for your help

 

Debbie

Hi @Anonymous 

 

If you can mark the first one as a solution just so that others can use it given your original post, that will allow better solution identification down the track. However, to get you the additional caveat item, you can use below:

 

Measure = 

VAR _1 = CALCULATE
( MAX ( TableTest[Column1] ) , LEFT ( TableTest[Column1] , 2 ) = "FM" )
RETURN
IF ( LEFT ( TableTest[Column1] , 2 ) <> "FM" , BLANK() , _1 )

 Hope this helps!

Theo

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

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
Top Kudoed Authors