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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ThomasWeppler
Impactful Individual
Impactful Individual

How do I make sure a max formula is affected by my date filter?

Hi Power Bi community
I have a table which contains the status of diffrent projects at diffrent times.
It look like this.

ThomasWeppler_0-1660740093776.png

I want to find the last stateid based on the date and todoid.
So I use a Dax formular like this.
Luckly a higher id always means a later date so I can use this Dax code.

Status IGA =
var _maxid = MAX(Todostatehistory[id])
return
LOOKUPVALUE(Todostatehistory[stateid], Todostatehistory[id], _maxid)

When I place it in a table it will only look at the relevent todoid. 
However I also has a filter which filter on the highestdate based on the date., but it doesn't seem to affect my dax code.

So my question is what can I do to make sure my Dax is affected by my Date filter?



1 ACCEPTED SOLUTION

@Greg_Deckler 
Ok I found the problem.
I used a calender table so one slicer could affect multiple tables.

But the date colum in my table was thype = time date/ time while my calender table colum hads the type = date.

Thanks a lot for the help Greg, sometimes you just need the right question to start thinking in a new way.
A moderator can close this thread.

View solution in original post

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @ThomasWeppler ,

 

Glad to hear that your problem has been solved. Could please mark your reply as a solution and then more people will benefit from it.

 

Best Regards,

Stephen Tao

Greg_Deckler
Super User
Super User

@ThomasWeppler If you are using your Dato column as your date filter then assuming this is a slicer or something in the Filter pane then this should already be filtering your rows in that table. Is that what you are doing or something else?



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 
Ok I found the problem.
I used a calender table so one slicer could affect multiple tables.

But the date colum in my table was thype = time date/ time while my calender table colum hads the type = date.

Thanks a lot for the help Greg, sometimes you just need the right question to start thinking in a new way.
A moderator can close this thread.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.