Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Show data for last 12 full months only

Posted on 2015-01-03
2
Medium Priority
?
305 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 1000 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 1000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
Stellar Exchange Toolkit: this 5 in 1 toolkit comes loaded with mega-software tool. Here’s an introduction to tools’ usage and advantages:
This video will demonstrate how to find the puppet warp tool from the edit menu and where to put the points to edit.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

971 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