Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a field year contains jan,feb,mar........with sum(sales) as another field.
i need to calculate the difference between current selected month and previous month.(ie)if i selected feb month then the result should find difference between jan and feb.....
pls,help me out thanks in advance.
There are several ways to do this. The best methods use set analysis. Within set analysis, then, there are several different approaches. For example: sum( {$<MonthYear = {$(#=Only(MonthYear)-1)}>} Sales ). This was taken directly from the Help file; search for "set analysis" for more details and other ideas (the above is not the simplest solution in your case).
Regards,
Hi
Koushik
Use given expression for ur problem
PMTD=sum({$Year={$(=max(Year)-$(=if(max(Month)=1,1,0)))},Month={$(=Month(addMonths(Max(orderDate),-1)))}>}Sales)
Regrads
Kaushal Mehta