Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I need to create straight table where Dimensions are Customer, Product, Storage, Year
and Expressions are sum(Sales) in Year and sum(Sales) in Previous Year.
Something like this:
where number in column F is Sales in 2015 and number in column G is Sales in 2015 -1
Any idea how can I do it?
Many thanks!
If you are ever going to select one year, then may be this:
=Before(Sum({<Year = {$(=If(GetSelectedCount(Year) = 1, GetFieldSelections(Year)-1, Chr(39) & '*' & Chr(39)))}>}Sales))
There are two ways to do this:
1) Either use the As-of table in the script (The As-Of Table)
2) or use Above(TOTAL ...) method.
For a more precise help, can you provide a sample?
That looks like a pivot table to me. If you want to do this in a straight table you'll have to create two expressions for each year that you want to show.
Ok, it is a pivot table.
what I need to write in expression?
I have year in dimension and one expression is sum(sales) and second?
Try sum(sales) and before(sum(sales))
I attached small example
I attached small example
Gysbert's solution seems to be working, isn't it? or are you looking for something else?
It is correct when Year doesn't select
and if select Year, for example 2016, it's not correct
See attached example