Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
i have a report where im using Week as dimension.
I need to add an expression where i have to make the sum of sales where Week = Week-1.
I have the week as dimension and i need to calculate 2 expressions depending on the week dimension.
I'm using sum({$<Week={$(=Week)}>}Sales) btu it's not working when i use sum({$<Week={$(=Week-1)}>}Sales) to get the sum of previous week.
so i'm trying to use the column header of the week -1.
to be more clear
Week | SUM of This Week | Sum of Previous Week |
---|---|---|
2 | Sum of Week 2 | Sum of Week 1 |
3 | Sum of Week 3 | Sum of Week 2 |
4 | Sum of Week 4 | Sum of Week 3 |
Anyone can help???
Hi,
I am still not clear about the problem.
You said you want expression which will give you sum only when week = week -1.
Can you tell us in detail with how you are getting week.
Regards,
Kaushik Solanki
Week is a dimension used in the pivot
Hi,
Thats fine.. can you please describe in detail? Like what you have and what you are trying to achieve.
Regards,
Kaushik Solanki
I have Week as dimension,
I Added ana expressions Sum of sales for each week,
I still need to add a new expression where I also have to calculate the sales but for The previous Week of the dimension
Ok,
Let me explain what you want to do.
Say you have data like this.
Week Sales
2 100
3 200
4 300
5 400
And you want the chart to look like this.
Week Sales1 Sales 2
2 100 -
3 200 100
4 300 200
5 400 300
If yes then try this.
Create a straight chart with dimension as week.
First Expression as sum(Sales)
Second Expression as Above(sum(Sales))
Regards,
Kaushik Solanki
Hi,
See the attached sample file how you find the values of two expression and values of previous week
1. =sum(Sales)
2. =Above(sum(Sales))
As kaushik say about that.
Regards,
Anand