I am strugging to find out a solution to always display values of last 7 days in visual date slicer. User don’t want to use Relatives Date.
I have managed to create a new column on my date calendar which gives a value of 1 one when evaluates to true if date is within -7/7 days of max dates in the Fact Table:
Last 7 days = VAR _maxdate = MAX ( ‘ FactTable ’[Date] ) RETURN IF ( DATEDIFF ( Calendar[Date]; _maxdate; DAY ) IN GENERATESERIES ( -7; 7; 1 ); 1; 0 )
I apply this measures to filter on visual and Advanced Filtering by Values = 1.
The problem is that when refreshing data, slicer’s values won’t change and update.
Any ideas how may I improve this behaviour?
Thanks in advanced!