Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need help creating a variable.
I have the following fields:
[Reporting Period Index]
[Reporting Date]
I want to create 2 variables that will give me the start and end dates of the previous reporting period index.
eg.
Currently in reporting period index 103
previous Reporting Period Index = 102
reporting dates for previous period = 27/12/2012 - 31/01/2013.
so i would want the variable to show 27/12/2012
and the same for the end date. so a 2nd variable would show 31/01/2013
Can anyone help me please?
Something like this:
vStartPreviousPeriod: min({<[Reporting Date]=,[Reporting Period Index]={$(max([Reporting Period Index])-1)}>} [Reporting Date])
vEndPreviousPeriod: max({<[Reporting Date]=,[Reporting Period Index]={$(max([Reporting Period Index])-1)}>} [Reporting Date])
You'll have to select a reporting date or a reporting period index otherwise you simply get the start and end of the second last period.
Thanks that worked! but i have come into work this morning to find that they have changed their mind! they now want to report on previous calendar month instead on period.
I have the following previous month variable...
vLastMonth = =Month(AddMonths(Date([Reporting Date]),-1))
But i cant seem to get the variable to work in my expression.
sum({<[Reporting Week]=, [Reporting Date]={'=$(=date(vLastMonth))'},[Reason Group] = {'Upgrade'}>} [Revenue Loss])
Any Ideas?
Hi, i have managed to do this now.
thanks