Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Restrict Chart Horizontal Axis to last 12 hours

Author  Topic 

MichelleMabbs
Starting Member

24 Posts

Posted - 2014-01-03 : 09:10:54
Hi there please can someone tell me how to restrict my chart to the last 12 hours

my hour is an int and is from 0 to 23 hours

Kind Regards
Michelle

Michelle

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-01-03 : 09:44:42
Include a filter in query behind as below


WHERE hourfield > = DATEPART(hh,DATEADD(hh,-12,GETDATE()))
..

then in chart just choose field on corresponding axis

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -