Reputation: 35557
We have the following measure, which is being used in a card in the top right of a report just to let the user know what the maximum date is in the model - just so they have visibility of whether the report is the latest version.
Unfortunately when a date slicer in the report is changed the filter context changes the result of this card. The measure is as follows:
Max_DateTo =
FORMAT(
CALCULATE(
MAX( tb_fact[DateTo] ),
ALL ( tb_fact[DateTo] )
) + 1
,"DD MMM"
)
How do we change the above to always ignore all filter context?
Upvotes: 1
Views: 54
Reputation: 1005
In your example you are only overwriting the filter on [dateTo], so all other filters still apply. You want to overrule all filters on the table.
Formula to calculate your last date with context filtering
MaxDate:=max('Date'[Date])
Remove the context filter on your table:
maxdate no context:=CALCULATE([MaxDate],ALL('Date'))
Upvotes: 2