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
Anonymous
Not applicable

Why does MAX(DATE) return multiple values?

'Date_0' is type date and has dates till 2021-12-31. However, Max(Date) returns all dates from 2021 in stead of 2021-12-31.

Could someboday please help on this?

ARandomJungler_0-1651049218031.png

Thanks in advance!

 

7 REPLIES 7
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.

If you need more help, please let me know.

 

Best Regards,

Community Support Team _Tang

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

Hi @Anonymous ,

 

I think this has to do with your filter context.

If you always want to have the last one, the following formula might help.

Latest_Date = MAXX(ALL(raw[Date_0]), raw[Date_0])

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Anonymous
Not applicable

thanks for your reply. unfortunately it didnt work...I'm still seeing the same thing

ARandomJungler_0-1651050980665.png

 

Hi @Anonymous ,

 

I'm not sure what you're trying to accomplish.
In your screenshot I see a table with year, quarter, month and day and the DAX formula for the Latest_Date calculation.

You do realize that the DAX formula is not a filter for the visual, but only a calculation that can then be output in a visual.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Anonymous
Not applicable

It has nothing to do with filter. My screenshot shows the formula i put in and the table shows the result i got. If this helps, please see the below sc 

ARandomJungler_1-1651053553133.png

 

@Anonymous ,

 

there are a few things we need to consider here.
1. Why are you using a calculated column and not a masure?
2. Why have you activated the Auto Date/Time function?

 

Currently, you could simply switch the display from the built-in Date Hierarchy to the value of the column.

 

LatestDateAutoDateTime.png

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


@Anonymous 

 

If you want to filter, you should use the filter pane. e.g. like this.

Filter Last.png

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


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.