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

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

=Format(DateAdd(DateInterval.Month,-1,Today()),"yyyyMM")
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page

Similar Messages

Maybe you are looking for

  • Can't open "People" due to error message saying email address not found

    Unable to access addresses saved in "People". I am able to open, but error message reads that email address cannot be found.

  • FDM :  Error while checking Integration Settings

    Hi, I am in the process of setting up an FDM App (Version 9.3.1)) for loading data to Essbase. I've Imported and Registered ES9X-G4-A Adaptor via Workbench. I've also added the Machine Profile. When I try to test Integration Settings in the Web Clien

  • Copy selected lines in the table control

    Hi friends, I Have a screen 200 in which i have a button COPY and table control. In my table control i have 6 lines of data. now my requirement is when i select any lines  ie :  let us say i ahve selected 1 , 3 , 5 lines of my table control and when

  • Linking my BTVision box to new Samsung Smart TV

    I bought a Samsung Smart TV 6000 series yesterday and have put the areial into the tv for tuning to take advantage of the Freeview HD. I have connected the BTVision box to the tv via HDMI - how do I record programs from the TV ??

  • Ligtroom Webgalerie in Dreamweaver einbinden

    Guten Abend! Ich möchte die in Lightroom erstellte Webgalerie mit meiner DW Homepage verlinken, wer weiß wie's geht? In LR gibt es die Option die Galerie auf den Server zu laden, aber wie kann ich diese Galerie mit DW verlinken. Danke FP