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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AFinster
Helper I
Helper I

Filter Chart based on MAX of date slicer

Hi all,

I need additional help based on a previous solution: Filter Table based on MAX of date slicer 

 

What I need is to not only filter a table based on a "Before"-based date slicer (already solved above), but to also show the same results in a chart filtered using the same date metric / slicer interface.

 

Link to pbix 

Link to Excel data 

 

Any thoughts?

Thanks in advance,

Adam

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AFinster , you can not put a visual level filter for that, you need to have measure like this

 

measure=

var _min =MAxX('Date','Date'[Date])
return
CALCULATE('Table'[Sales], Filter(Date,'Date'[Date] =_min ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@AFinster , you can not put a visual level filter for that, you need to have measure like this

 

measure=

var _min =MAxX('Date','Date'[Date])
return
CALCULATE('Table'[Sales], Filter(Date,'Date'[Date] =_min ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks @amitchandak ,

 

I modified the measure to suit my examples:

Sales by Company =
VAR _max = MAXX(WeekData, WeekData[ToDate])
RETURN
CALCULATE(SUM(Sales[Sales]), FILTER(sales, Sales[Week Ending] = _max))

 

as the CALCULATE() function needed the SUM() function in the 1st parameter for it to work. This worked exactly as I needed!

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.