Solved

Show data for last 12 full months only

Posted on 2015-01-03
2
278 Views
Last Modified: 2015-01-08
A parameter selection that is available is for the previous 12 months shows the current month as well. I only want to show data for the last 12 full months. The application uses SQL based query formats as well. Tableau Business Intelligence...

Any help is appreciated
0
Comment
Question by:srodgers45
2 Comments
 
LVL 8

Assisted Solution

by:Ganapathi
Ganapathi earned 250 total points
ID: 40529371
If the number "12" months  does not change, then you may not need a parameter.
SELECT
   ----
   ----
FROM
    table
WHERE
   table-date-column >= DATEADD(MM,12,GETDATE())

Open in new window

0
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 250 total points
ID: 40529427
I think this is what you want:


SELECT ...

From ...

Where date column < DATEADD(month, DATEDIFF(month, 0, GETDATE()), 0)
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
Let’s list some of the technologies that enable smooth teleworking. 
Viewers will learn how to use the Hootsuite Dashboard.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now