Solved

Show data for last 12 full months only

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Migration from Netsuite to Quickbooks 1 77
What is Ransomware? 16 87
Calibrating x & y screen  pixel coordinates 1 39
Gaming Software 1 19
If your app took Google’s lash recently, here are the 5 most likely reasons.
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

830 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