Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have two Fiscal Year of Data. lease see following images:
I want to implement the Year on Year comparison in single chart.
For Example if user select 2014-2015 then previous will be 2013-2014. My fiscal year start from July to June like its coming in chart.
Thanks.
Follow This:
Create two variables
vCurrent = left(FiscalYear,4)&'-'&(left(FiscalYear,4)+1)
vPrevious = Left(FiscalYear,4)-1&'-'&Left(FiscalYear,4)
Now In Chart Selection FiscalMonth Dimension as you are using the same and write following two expressions:
Current Year: Sum({<FiscalYear={'$(vCurrent)'}>} <Your Field>)
Previous: Sum({<FiscalYear={'$(vPrevious)'}>} <Your Field>)
Hope This will work.
JS
Try to use these expressions;
For Current Year: Sum({<FiscalYear={$(=Max(FiscalYear))}>} DataField)
For Previous Year: Sum({<FiscalYear={$(=Max(FiscalYear)-1)}>} DataField)
Hi Pradip,
I can not use Max(FiscalYear)-1 directly..see Fiscal year format.
Can you upload some sample data with expected output?
See the image its is showing the selected year...I want to add one more line in the same chart for previous Year.
Sample file is attached. But please share the script as I am using Personal Edition.
Any Suggestions Plz.
PFA. Hope it will help.
Follow This:
Create two variables
vCurrent = left(FiscalYear,4)&'-'&(left(FiscalYear,4)+1)
vPrevious = Left(FiscalYear,4)-1&'-'&Left(FiscalYear,4)
Now In Chart Selection FiscalMonth Dimension as you are using the same and write following two expressions:
Current Year: Sum({<FiscalYear={'$(vCurrent)'}>} <Your Field>)
Previous: Sum({<FiscalYear={'$(vPrevious)'}>} <Your Field>)
Hope This will work.
JS
Alternatively you could use 2 lists boxes corresponding to different alternate states and then call
State A from expression 1
State B from expression 2
this way you could compare any 2 years and aren't locked in year and year -1