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.
Author |
Topic |
Nimay11
Starting Member
3 Posts |
Posted - 2008-07-29 : 20:01:11
|
Hi All, I am learning Reporting Services right now and need your help in one of my caseCase Scenario : Table with three columns : dt_weekending, Centre_code, Revenue_totalNow as per my requirements, one of my row in report contains data from the selected weekending as well as previous week's data and also the next week's data. i.e. my report row has got three fields : Previous week Revenue total, Present selected week revenue total and Next week revenue total....Could you please let me know how should I do that. I initially thought of using PIVOT function of sql but that is not working for me. Could you please reply me asap.I have shortened my version for better understanding but the original version is lot more complicated.Waiting in anticipation,Thanks,NimeshThanks,Nimesh |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-31 : 13:14:06
|
so dt_weekending will have end dates of weeks? in that case you just need this Previous week Revenue total expression will be=SUM(IIF(Fields!dt_weekending.value=DateAdd("d",-7,Parameters!weekending.value),Fields!Revenue_total.value,0))Present selected week revenue total=SUM(IIF(Fields!dt_weekending.value=Parameters!weekending.value,Fields!Revenue_total.value,0))Next week revenue total=SUM(IIF(Fields!dt_weekending.value=DateAdd("d",7,Parameters!weekending.value),Fields!Revenue_total.value,0)) |
|
|
|
|
|
|
|