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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ThomasWeppler
Super User
Super User

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

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
Community Champion
Community Champion

@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!:
DAX For Humans

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
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