Tsko
Tsko

Reputation: 63

Power Bi default date range

filter settings date filter

I have i date filter in my Power BI report (slicer type between). I need to configure it to default to show data for the last 8 months back from today's date. I found an option to set up Filter type: relative date, Show items: is in the last 8 months , which works, but the problem is that I can't select in the from field an older date than the 8 months (I can only select from dates in the last 8 months, which is a bit strange behavior). How can I achieve the same result but with the option to choose any date (even older than 8 months etc).

Upvotes: 0

Views: 477

Answers (1)

Amira Bedhiafi
Amira Bedhiafi

Reputation: 1

You already imposed your selection by saying the last 8 months. The only way I think about is to use a filter on your slicer, so you need to create a calculated column :

Is Last 8 Months = 
VAR CurrentDate = TODAY()
VAR StartDate = EDATE(CurrentDate, -8)
RETURN
IF (
    AND('Date'[Date] >= StartDate, 'Date'[Date] <= CurrentDate),
    TRUE(),
    FALSE()
)

and alternate between True if you want to include only the dates for the last 8 months starting from today:

enter image description here

or False to include an older date :

enter image description here

Upvotes: 1

Related Questions