MTD Expression on a single column - SSRS
Posted
by
Eric
on Stack Overflow
See other posts from Stack Overflow
or by Eric
Published on 2014-08-19T09:04:34Z
Indexed on
2014/08/20
4:22 UTC
Read the original article
Hit count: 170
reporting-services
I need a bit of help here. I have been unable to create an 'Month To Date' expression to a single column on SSRS.
I tested the following expression from a similar question in the forum, but it gives me a squiggly line below the variable 'd'
=IIF(Fields!CreateDate.Value >= DateAdd(d,-7,Today()), Sum(Fields!Sales.Value), 0)
If I run it, of course I got an error telling me that 'd' is not declared. ;)
I changed it to ... DateAdd("d",-7,Today()), Sum(Fields!Sales.Value) ... following the example and the squiggly goes below the brackets of "today()" and needless to say it...but still not working.
I tried a Dateadd(mm..Datediff ... and still nothing.
My report has the following columns:
Country | CustomerName | Sales | InvNotProcessed | Open Order | Orders | TotalbyCust
What I need is to show the new MTD sales only in the column named "Sales" while the other three shows the rest of the query, which should be open as some orders may take quite a while to manufacture and invoice. the last column sums the totals of all other columns.
Any help will be much appreciated.
Regards, Eric
© Stack Overflow or respective owner