3 Replies Latest reply: May 2, 2013 2:18 AM by Some Nath Roy

# Set Anlaysis to show 2 months position

Hi all

I have several month snapshot data loaded and set analysis to show Mar 2013 and previous month, in this case is Feb 2013 when i selected Mar 2013 snapshot as below:

 Status Mar 2013 =sum({\$}OS) =sum({\$}OS) Feb 2013 =sum({\$} OS) PF 78,421,218,867 79.5% 5,107,813,445 80.9% Impaired 15,890,083,951 16.1% 921,083,290 14.6% WL 4,287,853,168 4.3% 282,361,130 4.5% 98,599,155,985 100.0% 6,311,257,865 100.0%

However, the Mar 2013 OS is wrong, I would think the set analysis should be okay, right?

Anyone could help.

• ###### Re: Set Anlaysis to show 2 months position

Hi,

1) for Mar2013

=sum({<Year={\$(=max(Year))},Month={'Mar'}>}OS)    or    =sum({<Year={2013},Month={'Mar'}>}OS)

or

if you want the current month then

=sum({<Year={\$(=max(Year))},Month={Month(Today())}>}OS)

2)for Feb2013

=sum({<Year={\$(=max(Year))},Month={'Feb'}>}OS)  or         =sum({<Year={2013},Month={'Feb'}>}OS)

or

if you want the current month then

=sum({<Year={\$(=max(Year))},Month={\$(=Month(Today()-1))}>}OS)

Regards:

Narender

• ###### Re: Set Anlaysis to show 2 months position

Apologize, I did not elaborate my question clearly.

Actually I have Year (2012, 2013) and Month (Jan - Dec) listboxes, my requirement is when I select lets say 2013 Year and Jan Month, the straight table will show the Jan 2013 vs previos month position.

I use the set analysis as below

Jan 2013 =

sum({\$}OS) (However,it give the lump sum of all month snapshots instead of the selected Jan 2013 position only)

Previous month =sum({\$<Year = {\$(=only(Year) - \$(=if(only(Month) = 1, 1, 0)))}, Month = {\$(=month(addmonths(MonthYear, -1)))}>} OS) (the previous month seem okay).

What go wrong with the sum({\$}OS)?

• ###### Re: Set Anlaysis to show 2 months position

Hi,

It makes easy to apply calendar related functions with Date rather than discrete year, month. Thus you may create a Date field with help of existing Year and Month fields. Hope attached file could help you.

Regards,

Som