Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a field year contains 2011,2012,2013 and month filter jan,feb,mar etc
i need to calculate the difference sales between current selected year month and previous month.(ie)
if i selected year 2011 then feb month then the result should find difference between jan and feb.....
pls,help me out thanks in advance.
sum({$<Year={$(=max(Year))},Month={$(=month(addmonths(InvoiceDate,0)))}>}Sales)
-
sum({$<Year={$(=max(Year))},Month={$(=month(addmonths(InvoiceDate,-1)))}>}Sales)
Hi
Im looking for Sales diffrance eg if select year 2011 and month Jan and Feb.then sales diffrance will be Jan(sales)-Feb(sales)
So are you saying you'll always select exactly two months and that too consecutive months?
sum({$<Year={$(=max(Year))},Month={$(=TextBetween(GetFieldSelections(Month),'',','))}>}Sales)
-
sum({$<Year={$(=max(Year))},Month={$(=TextBetween(GetFieldSelections(Month),',',''))}>}Sales)
will do exactly as you described
Sir,
It looks good but when i added my experssion part its not working.can pls upload sample app.
Thanks
No.Any range selected month or year.just like Select CY Month sales- CP Month sales
eg
sum (Feb(sales)-Jan(sales)) as diffrance between two month for selected Year
Thanks .my mistake missed some filed,If i select range of two month its showing properly diffrance .but im looking it should do calculate if not selected also.
Eg
Year selected (if not selected year it should be shown for month on month diffrance for all the Year)
2011
Jan-Feb dif | Feb-Mar dif so on in pivot table(ie Jan sales is 200- feb sales 100)
100 200
2012
Jan-Feb dif | Feb-Mar dif so on in pivot table
500 200
2013
Jan-Feb dif | Feb-Mar dif so on in pivot table
60 70
see attached
i like the way you done it might usefull to me in future analysis.i wll upload some sample app by today evening so you understand well thanks for try.