7 Replies Latest reply on Jul 9, 2018 5:33 AM by Mahfooj Khan

# show 12 previous months using filtre date

Hello community ,

I have dashboard contains 2 graphs and filtre "Date "  , the first one show 12 previous months from the selected date  in filtre  and other graph show the selected date

can i get this result using filtre date instead of parametre date

any ideas plz

• ###### 1. Re: show 12 previous months using filtre date

Hi Mariam,

Create parameter month and set date range.

Create calculation and add into filter and select true.

[Date Range]

and datetrunc('month',[Order Date])<=[Month]

then "Show" else "Hide" end

Thanks

sankar

1 of 1 people found this helpful
• ###### 2. Re: show 12 previous months using filtre date

Hi Mariam,

hope it helps you.

BR,

bharat

• ###### 3. Re: show 12 previous months using filtre date

HI sankar ,

Thank you for your feedback , but i dont want to use parametre because it's static , i dont want  for each time i update the parametre , there is  any solution ?

• ###### 4. Re: show 12 previous months using filtre date

Thank you Kumar, but my aim is using fltre date instead of parametre date

• ###### 5. Re: show 12 previous months using filtre date

Hi Mariam,

Thee is no parameter used in the links i shared earlier.Its filter.

BR,

bharat

• ###### 6. Re: show 12 previous months using filtre date

It's a parametre , can you check it too

Thank you for you feedback

• ###### 7. Re: show 12 previous months using filtre date

Hi,

You can try something like this,

Create calculated field using below formula, put your date on filter and apply context filter on it.

Last 12 months:

IF DATETRUNC('month',[Order Date])>DATEADD('month',-12,{MAX(DATETRUNC('month',[Order Date]))}) THEN [Sales]

END

For selected month

Selected Month:

IF DATETRUNC('month',[Order Date])={MAX(DATETRUNC('month',[Order Date]))} THEN [Sales]

END

Let us know if this help. Workbook v10.5 attached for your reference.

Mahfooj