5 Replies Latest reply on Feb 7, 2020 3:48 AM by Oliver Tommy

# I need to show data for the last full 12 months skipping the current month

Current the parameter for the previous 12 months shows the current month as well. I only want to show data for the last 12 full months.

Any help is appreciated.

• ###### 1. Re: I need to show data for the last full 12 months skipping the current month

Are you using table calculations to show what you want. You can use last() function and place it on the filter shelf and select True;

// Calc field

last() > 0 and last() < 13

If this is not what you are looking for, attaching a workbook would be helpful

..kk

2 of 2 people found this helpful
• ###### 2. Re: I need to show data for the last full 12 months skipping the current month

Here is a sample of the workbook. I just want to show data for the previous 12 months, not including the current month on a rolling basis.  Currently it should be from Jan 1 to Dec 31 2014, next month Feb to Jan, etc…

Thanks you.

• ###### 3. Re: I need to show data for the last full 12 months skipping the current month

You could create a calculated field:

Last 12 Full Months=

```DATEDIFF('month', [Incident Date], TODAY()) > 0    // Exclude current month
AND
DATEDIFF('month', [Incident Date], TODAY()) <= 12  // Include only last 12 months
```

TODAY() just returns the current date. DATEDIFF('month', incident date, today) calculates the number of months between the incident date and TODAY(). If it's less than a month---for example, incident date of Jan 2, 2015, and TODAY is Jan 3---then DATEDIFF('month', #2015-1-2#, #2015-1-4#) = 0.

Drag this field to the filter shelf.

This becomes surprisingly more complicated if you can't use TODAY() but instead need to find the last date in the data. You'd need to do this to prevent showing partial months if you open the workbook in February, but the data hasn't been updated since Jan 4.

Jim

3 of 3 people found this helpful
• ###### 4. Re: I need to show data for the last full 12 months skipping the current month

Hi,

Go through the following Procedure

1)      Drag Date field on to row shelf.

2) Create a Calculated field with the following Syntax:

3) Drag the “Last 12 Months Sales” Field onto Columns shelf.

4) Drag “Last 12 Months Sales” onto Filter’s shelf, click on Special tab, click on “Non-null Values”

Best Regards

Laxman Kumar

2 of 2 people found this helpful