| Author |
Topic  |
|
|
sz1
Constraint Violating Yak Guru
United Kingdom
294 Posts |
Posted - 12/17/2012 : 09:16:20
|
Hi
I am trying to return the data from the below expression that is the -7 days from the currentdate.
This returns the correct figure for all resolved calls: =Sum(IIF(Fields!NUMBER_OF_DAYS.Value < 3,1,0),"DataSet1")/Count(Fields!NUMBER_OF_DAYS.Value, "DataSet1")
Can I use a DataAdd like below to give me -7 days and append to the expression? or do I need to use the resolved date field - 7 And DateAdd("d", -7,now())
SO, =Sum(IIF(Fields!NUMBER_OF_DAYS.Value < 3,1,0),"DataSet1")And DateAdd("d", -7,now()) /Count(Fields!NUMBER_OF_DAYS.Value, "DataSet1")
Help appreciated. Thanks
Also tried this to no ovail...
=Sum(IIF(Fields!NUMBER_OF_DAYS.Value < 3,1,0), and DateAdd("d", -7,Today()) ,"DataSet1") /Count(Fields!NUMBER_OF_DAYS.Value, "DataSet1")
and this although it returns a percentage its very low...
=Sum(IIF(Fields!NUMBER_OF_DAYS.Value < 3,1,0) and Fields!LastWeek.Value ,"DataSet1") /Count(Fields!NUMBER_OF_DAYS.Value, "DataSet1")
|
Edited by - sz1 on 12/17/2012 10:01:38
|
|
|
sz1
Constraint Violating Yak Guru
United Kingdom
294 Posts |
Posted - 12/17/2012 : 10:14:47
|
I actually need the previous days figure so trying this:
=Sum(IIF(Fields!NUMBER_OF_DAYS.Value < 3,1,0) and Fields!Yesterday.Value,"DataSet1") /Count(Fields!NUMBER_OF_DAYS.Value, "DataSet1")
The Yesterday field is built in to the DatMart but it does not return anything near correct, can some one advice on the syntax on this on eplease to be able to calculate the above but for the previous day?
Thanks |
 |
|
|
Matengele
Starting Member
Zambia
4 Posts |
Posted - 01/01/2013 : 11:53:04
|
| try comparing your dataset date to getdate()-7. Note this should be done in your stored proc if you have one or in the text script that makes up your dataset |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47023 Posts |
Posted - 01/01/2013 : 23:54:28
|
can you explain what percentage you're trying to calculate here? your current expression doesnt make much sense
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
| |
Topic  |
|
|
|