Show data for last 12 full months only

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
srodgers45Asked:
Who is Participating?
 
Phillip BurtonConnect With a Mentor Director, Practice Manager and Computing ConsultantCommented:
I think this is what you want:


SELECT ...

From ...

Where date column < DATEADD(month, DATEDIFF(month, 0, GETDATE()), 0)
0
 
GanapathiConnect With a Mentor Facets DeveloperCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.