Solved

Show data for last 12 full months only

Posted on 2015-01-03
2
279 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This video shows how use content aware, what it’s used for, and when to use it over other tools.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

895 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

11 Experts available now in Live!

Get 1:1 Help Now