Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue with set analysis

Hi all,

I am trying to create a chart that shows a yearly trend and for that I am using set analysis on the year:

sum({$<Year=>}_profit)

/ sum({$<Year=>}_assets)

But I have an issue with creating the correct denominator. In business terms the correct calculation is:

(Assets current year + Assets last year)/2

For the yearly trend this means:

2009: (assets09 + assets08)/2

2010: (assets10 + assets09)/2

2011: (assets11 + assets10)/2

Any ideas, how to set up the expression, so that I can show the yearly trends for above?

Thanks for your help!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

If your dimension is year, try using one of the chart inter record functions, above() or below() (depending on your sort order) or before() and after() (if dimension is pivoted in a pivot table):

sum({$<Year=>}_profit)

/ (sum({$<Year=>}_assets) + above(sum({$<Year=>}_assets)) )

View solution in original post

3 Replies
jvitantonio
Luminary Alumni
Luminary Alumni

Use:

(sum({$<Year={'2009'}>}_assets)+sum({$<Year={'2010'}>}_assets))/2

swuehl
MVP
MVP

If your dimension is year, try using one of the chart inter record functions, above() or below() (depending on your sort order) or before() and after() (if dimension is pivoted in a pivot table):

sum({$<Year=>}_profit)

/ (sum({$<Year=>}_assets) + above(sum({$<Year=>}_assets)) )

Not applicable
Author

Thanks!