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
luizahenriques
Frequent Visitor

How to get the earlier date

Hello!

 

I have a measure that results in dates and I'd to get the earlier date (in this case 30/05/2027). Is import to say that I put at FALSE argument (IF) the blank() but I accept other sugestions.

 

luizahenriques_0-1669849230933.png

Do you know if is possible?

 

Thank you so much!

3 REPLIES 3
v-tangjie-msft
Community Support
Community Support

Hi @luizahenriques ,

 

According to your description, here are my steps you can follow as a solution.

(1) We can create a measure. 

earlier date = MINX(FILTER(ALLSELECTED('Table'),[UltimoMesSaldo]<>BLANK()),[UltimoMesSaldo])

(2) Then the result is as follows.

vtangjiemsft_0-1671610923757.png

 

Best Regards,

Neeko Tang

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

luizahenriques
Frequent Visitor

Thank for answering! But this functions work only with columns, not measures. "UltimoMesSaldo" is a measure.

vicky_
Super User
Super User

If you just need to get the last date overall, you can create a measure to return the last date. Something like: CALCULATE(LASTDATE(UltimoMesSaldo), ALL(TableName)). Sorry i don't have accent keys on this keyboard BTW.

Or, you can look into the LastNonBlank function to return the last value which is not blank. Docs here: https://learn.microsoft.com/en-us/dax/lastnonblank-function-dax

 

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.