Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have Unit number , Date, Sales fields, I would like to calculated sum of sales for each unit number , from the minimum date of each department number to select no of months.
ex: I have Unit 1 in the year 2004/jan/25 sale $100, for the same Unit on 2004/feb/21 I have sale say $200 and for the
Unit 2 in the year 2006/<mar/25 sale $50, for the same Unit on 2007/Apr/19 I have sale say $250
now I would like to calculate a field on Date which will give me First 2Month, 4monts, 6Month, .....>24Month.
if I select on first 2Months I would like to see
for Unit number 1 Sale 300
for Unit number 2 Sale 50
Can any one help on this.
Please find the sample data on attachment.
Thanks
John
Yes Your Correct, sum would be 116.
This?
Yes Sunny ,it seems working, however this functionality I want to implement with out these flags, just I need one field which contains first 1 Month, first 2 Months ..........up to today whatever the month it is, ideallyy autonumber(MonthName(Date),'MN');
I want to calculate a field which gives me a distinct number for each month through out all the years up to today for all the units.
then if I click on that field I would like to see those many months of data for each unit from its minimum date.
see the attachment, it might be helpful for you.... it is similar to sunindia
I have add crosstable, to convert all the period fields into into one field.
Another way:
HI,
Try this
Expression,
=sum(if(Date>=MonthStart(mindate)and Date<=MonthEnd(AddMonths(mindate, vMax)), Sales))
PFA for details
Sunny in the above attachment 1st Month Results are not populating. also there are some Year month values also missing .
here I am attaching a work around ,please find it , there is a bug on it I am getting values individually for every period, however when we are not selecting the period the amounts are showing huge for every unit. also please kingly let me know can I do it in more optimal way? actually the file size is 2.7 MB but now it has moved to 77 MB so some where I did mistake please kindly provide me a thought.
hic
Thanks
John
I see that you are using CrossTable() in the script. What exactly are you trying to do there? Are you using the solution proposed by Pradeep? He might be able to help you better if you are using his way of doing it?
You had 435,278 observations in your Excel File and after your script ended the number of observation increased to 33,081,128 (which equals the number of observations * No. of Period you have created). This is the reason the file size increased from 2.7 MB to 77 MB here.
Yes , there is the problem.