Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
Deputy example on the subject.
I have a Dimension Year and Sales.
YEAR SALES
2010 3
2011 4
2012 5
2013 7
2014 3
2015 5
And I want this:
YEAR SALES OUT
2010 3 3
2011 4 4
2012 5 2
2013 7 7
2014 3 3
2015 5 5
What I want is for one of the years shows sales that year minus the other , and the other showing the sum of sales.
That is, that in the year 2012 instead of 5 I appear 2 on the chart table , the 5 sales least 3 sales 2012 2010.
If I've done :
if ( [Year ] = 2012 , sum ( { < [Year ] = { 2012 } >} Sales) - ( sum ( { < [Year ] = { 2010 } >} Sales) ) , sum ( Sales) )
But this don`t work.
Is this possible ? how? thanks you!
regards
Variable : vSum2010=sum ( { < YEAR= { 2010 } >} SALES)
Expr: If(YEAR=2012,Sum({<YEAR={2012}>}SALES)-vSum2010,Sum(SALES))
Not sure if I've understood what you are trying to achieve.
Try maybe something like
if ( [Year ] = 2012 ,
sum (TOTAL { < [Year ] = { 2012 } >} Sales) - ( sum (TOTAL { < [Year ] = { 2010 } >} Sales) ) ,
sum ( Sales)
)
Variable : vSum2010=sum ( { < YEAR= { 2010 } >} SALES)
Expr: If(YEAR=2012,Sum({<YEAR={2012}>}SALES)-vSum2010,Sum(SALES))
Thank you!!!
I have this problema with your solution: