Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

When i select a month previous 3 months data should be shown

Hi my data is like this

Month            products

Dec 2015         10

Nov 2015           3

Oct 2015             1

Sep 2015           3

Aug 2015           6

Jun   2015         15

My requirement is when i select a month say Dec 2015, dec2015 data + the previous 3 months data sholud appear. If i selected oct 2015 i want oct2015 and previous 3 months data

Regards

Jhon

1 Solution

Accepted Solutions
sunny_talwar

Try this then

Count({<Month>} products) * Avg({<Month = {"$(='>=' & Date(AddMonths(Max(Month), -3), 'MMM YYYY') & '<=' &Date(AddMonths(Max(Month), 0), 'MMM YYYY'))"}>} 1)

View solution in original post

10 Replies
sunny_talwar

Use set analysis to do this. May be like this:

Count({<Month = {"$(='>=' & Date(AddMonths(Max(Month), -3), 'MMM YYYY') & '<=' & Date(AddMonths(Max(Month), 0), 'MMM YYYY'))"}>} products)

Not applicable
Author

Hi Sunny i have a straight table like this

Month  sum of products   count of x  %of y

And i have a list box month were all the months are present and when i click on a particular month the last 3 months data should come and should i write the same expression every where in other expressions also

sunny_talwar

Try this then

Count({<Month>} products) * Avg({<Month = {"$(='>=' & Date(AddMonths(Max(Month), -3), 'MMM YYYY') & '<=' &Date(AddMonths(Max(Month), 0), 'MMM YYYY'))"}>} 1)

Frank_Hartmann
Master II
Master II

another solution might be using a mastercalendar!

see attached sample.

hope this helps ! !

Not applicable
Author

Thank you so much sunny

Not applicable
Author

In June the top two profitted cuntries are Argentina and Japan

In May the top two profitted cuntries are America and Argentina

What i want is when i click on jun i want both june and may data to dispaly and the comparision should be between the selected month (jun) and top two values of it  Argentina and Japan to Argentina and Japanin May

sunny_talwar

Is this a new requirement or we still trying to fix the old one? If it is new, I would suggest starting a new thread to address this issue

Not applicable
Author

Hi Sunny this is a new requirement unfortunately the link is not moderator approved, i tried to create around 5 to 6 threads but no luck.

Can you please help me out on this