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(max(InvoiceDate),0)))}>}Sales)
-
sum({$<Year={$(=max(Year))},Month={$(=month(addmonths(max(InvoiceDate),-1)))}>}Sales)
substitute "InvoiceDate" for equivalent date value
Hi,
Thanks for your reply.i have tried but it shows only for max year by default i would like to show diffrance for all the year.
I have attached my sample app
thanks in advance
Hi,
Have a look at the application, hope this is what you want.
Regards,
Kaushik Solanki
I liked Kaushik's approach. I modified it slightly but I think either illustrates the core of the idea in using the before() and after() functions.
Thanks.
I like go with before option
But same time jan cols I need to hide as its coming as
zero.or otherwise month dim should be look (jan-feb) instead of jan,feb as its now
showing
And also let me know is any other approach handle this by writing set analysis or if condition
Thanks.
I like go with before option
But same time jan cols I need to hide as its coming as
zero.or otherwise month dim should be look (jan-feb) instead of jan,feb as its now
showing
And also let me know is any other approach handle this by writing set analysis or if condition
Sorry. But I don't understand what you are asking.
Hi ,
I mean How i can handle month on month diffrance for mutiple year selection by useing setanalysis insted of before function
thanks in advance
Let's clarify first. This is what I'm understanding so far.
This is what we have:
YEAR | 2011 | |||||||||||
MONTH | JAN | FEB | MAR | APR | MAY | JUN | JUL | AUG | SEP | OCT | NOV | DEC |
SALES | - | FEB - JAN | MAR - FEB | APR - MAR | MAY - APR | JUN - MAY | JUL - JUN | AUG - JUL | SEP - AUG | OCT - SEP | NOV - OCT | DEC - NOV |
Selections: | ||||||||||||
YEAR | 2011 |
You've said that the scenario will be such that the field selections for YEAR will be 2011 and 2012 (for example). In that situation, you want the chart to do something different to handle the multiple selections.
What exactly do you want it to do?
i.e.
possible results:
- if 2011 and 2012, then show just 2012 (12 total values in output)
- if 2011 and 2012, then show just 2011 (12 total values in output)
- if 2011 and 2012, then show both 2011 and 2012; calculate month over month for each (24 total values in output)
- if 2011 and 2012, then show cumulative difference for both years; (Mar2011+Mar2012) - (Apr2011+Apr2012) --> (12 total values in output
There are more possibilities but those were a few that quickly came to mind to offer as examples. The current set up you have will show the 3rd option with 24 values in the output. If you want something different, please describe the intended output.
Sorry to make you worry ,Thanks for your effort looking result as below
- if i select from slider 2011
and 2012 and 2013, then 2011 and 2012 and 2013; calculate month over month diffrance
Year | 2011(for 2011) | ||||||||
Month | Jan2011-Feb2011 Diff | Feb2011-Mar2011 Diff | Mar2011-Apr2011 diff | Apr-may diff | May-Jun | Jun-July | July-Aug | Aug-Sep | Same way Till Dec |
| 200 | 200 | 100 | 50 | 500 | 250 | 60 | 600 |
|
Eg. If select 2012 as Year then my month on
month difference should be
Year | 2012(for 2012) | ||||||||
Month | Jan2012-Feb2012 Diff | Feb2012-Mar2012 Diff | Mar2012-Apr2012 diff | Apr-may diff | May-Jun | Jun-July | July-Aug | Aug-Sep | Same way Till Dec |
| 200 | 200 | 100 | 50 | 500 | 250 | 60 | 600 |
|
Year | 2013(For 2013) | ||||||||
Month | Jan2013-Feb2013 Diff | Feb2013-Mar2013 Diff | Mar2013-Apr2013 diff | Apr-may diff | May-Jun | Jun-July | July-Aug | Aug-Sep | Same way Till Dec |
| 200 | 200 | 100 | 50 | 500 | 250 | 60 | 600 |
|
Thanks in advance sir