Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

How do I populate the Year and Previous Year in a SSRS calculated field

$
0
0

I'm calculating the difference between this year and last year sales and using the following equation which is working however, I need to replace the hard coded dates (2012 and 2013) with a formula to fill the value based on the current date. Any ideas?  I tried a couple things and received the error relating to date type and expecting an integer value?

=(Sum(IIF(Fields!Year.Value=2013,Fields!SalesAmount.Value,Nothing)))-(Sum(IIF(Fields!Year.Value=2012,Fields!SalesAmount.Value,Nothing)))

Kevin


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>