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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
wonka1234
Helper II
Helper II

Does a measure that uses CALCULATE(MAX(Field) Ignore the Slicer filter?

hi,

 

say i have a field called Report Date Final (text) that i use as a slicer. I have two values among many rows, April 2025 Final and March 2025 Final.  This column also has a orresponding report date ie

Report DateReport Date Text
April 2025April 2025 - Final
March 2025March 2025 - Final
March 2025March 2025 - Final

 

 

I have the slicer set to March 2025 - final 

wonka1234_0-1747924392394.png

 



my measure is using VAR MaxDate = CALCULATE(MAX(Report date)

 

My questions are:
1) while March 2025 - Final is in the slicer,   will MaxDate use March 2025 - Final as the Maximum date? or will it use April 2025 - final as the maximum date?

2) Or is it because I am using ALL it will go to April 2025 - Final.

 

 

Here is my measure - 
Sample Measure =
VAR MaxDate = CALCULATE(MAX('Table'[Report Date]))
VAR StartDate = EOMONTH(MaxDate, -12) + 1
VAR EndDate = EOMONTH(MaxDate, 0)
RETURN
COUNTROWS(FILTER(ALL('Table'),
'Table'[Birth_Date] >= StartDate &&
Table[Birth_Date] <= EndDate))

thanks.

1 ACCEPTED SOLUTION
v-karpurapud
Community Support
Community Support

Hi @wonka1234 

Welcome to the Microsoft Fabric Community Forum! Also , thank you @pankajnamekar25 for your response.

 Regarding your query on how CALCULATE(MAX([Report Date])) behaves in the presence of a slicer on 'Report Date Text', here is a detailed explanation:

 

When you apply a slicer on 'Report Date Text' (e.g., "March 2025 - Final"), this filter context is automatically propagated to the related column 'Report Date'.

Therefore, the expression CALCULATE(MAX('Table'[Report Date])) will evaluate the maximum date only within the filtered rows, and return March 2025, not April 2025.

 

If you want to ignore the slicer filter and compute the maximum report date from the entire dataset, you need to explicitly remove the filter using functions like ALL('Table') or ALL('Table'[Report Date Text]).This will return April 2025, which is the true maximum date in the full dataset.

 


If this response resolves your query, kindly mark it as Accepted Solution to help other community members. A Kudos is also appreciated if you found the response helpful.

 

 

Thank you!

View solution in original post

3 REPLIES 3
v-karpurapud
Community Support
Community Support

Hi @wonka1234 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

v-karpurapud
Community Support
Community Support

Hi @wonka1234 

Welcome to the Microsoft Fabric Community Forum! Also , thank you @pankajnamekar25 for your response.

 Regarding your query on how CALCULATE(MAX([Report Date])) behaves in the presence of a slicer on 'Report Date Text', here is a detailed explanation:

 

When you apply a slicer on 'Report Date Text' (e.g., "March 2025 - Final"), this filter context is automatically propagated to the related column 'Report Date'.

Therefore, the expression CALCULATE(MAX('Table'[Report Date])) will evaluate the maximum date only within the filtered rows, and return March 2025, not April 2025.

 

If you want to ignore the slicer filter and compute the maximum report date from the entire dataset, you need to explicitly remove the filter using functions like ALL('Table') or ALL('Table'[Report Date Text]).This will return April 2025, which is the true maximum date in the full dataset.

 


If this response resolves your query, kindly mark it as Accepted Solution to help other community members. A Kudos is also appreciated if you found the response helpful.

 

 

Thank you!

pankajnamekar25
Memorable Member
Memorable Member

Hello @wonka1234 

 

It will return March 2025.

This is because

The slicer is applying a filter on 'Table'[Report Date Text].

Unless you explicitly remove that filter, the context remains active inside the CALCULATE.

So your MAX(Report Date) will be evaluated within the filtered context of "March 2025 - Final".

Will it return April 2025 only if I use ALL()?

Yes. If you wrap the column in ALL('Table') or ALL('Table'[Report Date Text]), then you remove slicer filters, and MaxDate will be April 2025 (the true max from the full dataset).

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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