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
DavidB023
Helper III
Helper III

Last date value

Hi everybody !

 

I want to show a last date value without a slicer, so I try function like firstnonblank and lastnonblank but nothing worked..

Is it possible or should I put a date slicer in order to forecast a last date value ?

 

Thanks

Best regards

David

1 ACCEPTED SOLUTION

That is why it is important to post sample data to clarify. Try this:

 

Measure = 
VAR maxDate = MAX('Table'[Date])

RETURN
MAXX(FILTER('Table',[Date]=maxDate),[Column])

Something like that.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

8 REPLIES 8
YeldarR
Frequent Visitor

Hello.

Yes, that formula works for 1 level items. But when I add the one level above which is supposed to summarize the calculated level 1 numbers, it works exactly the same as level 1. It doesn't add but returns 1 biggest value. Can you solve that?

YeldarR_0-1642650854197.png

 

Anonymous
Not applicable

@DavidB023 I didn't understand what you want, but have you tried to use the function LASTDATE()?

@Anonymous

 

I would like to display a value which correspond to my last date value. So for exemple, my date are in month, today I want to see May value. (all of this without a slicer to choose date)

Hi @DavidB023

 

I think the simplest thing to do is to create a new measure

 

Last_Month = MAX(YourTable[Date].[Month])

 

 

- Quentin

Anonymous
Not applicable

@DavidB023 ok, maybe try = FORMAT(LASTDATE(TableName[Date].[Date]),"MMMM"), this formula returns the name of the month of the last date of the "Date" column you have.

You should just be able to use MAX.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@quentin_vigne@Anonymous@Greg_Deckler thanks for your answer !

In fact it concern squad data, so it would be easy like MAX if my enterprise just hire month after month ^^ but it is like :

 

may 2018                500
avril 2018                450
march 2018             503

 

So, today I want to display 500 on my repport..

That is why it is important to post sample data to clarify. Try this:

 

Measure = 
VAR maxDate = MAX('Table'[Date])

RETURN
MAXX(FILTER('Table',[Date]=maxDate),[Column])

Something like that.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.