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

Set Parameter to pick up previous month and year unless first month of the year

$
0
0


Hi,<o:p></o:p>

I have a start and end date set to the same format (CCYYMM) and date.<o:p></o:p>

I am running a report each month using the below expression.<o:p></o:p>

=Year(Today()) * 100 + Month(Today().AddMonths(-1))<o:p></o:p>

This functions correctly except when the report is run in January where the date returned is 201512 instead of 201412.<o:p></o:p>

Can someone advise of how i can get this expression to show the correct month when i run this in January?


M Stoker


Viewing all articles
Browse latest Browse all 10045

Trending Articles



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