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

Previous Year Sum

I'm having trouble showing data for the previous year in a Pivot Table.

I have an expression:

sum([staff member])

with Dimensions:
Region, Dept, Period

and wanted to add another expression as:

sum(year={<year-1>} [staff members])

have tried many different options but none seems to work. I'm using a Pivot Table.

4 Replies
Gysbert_Wassenaar

Try: sum({<year={'$(=only(year)-1)'>} [staff members]).

Note, you can't also use year as a dimension in your pivot chart and you need to select one year.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

This one is alsno not working.

Should I calculate totals in my script? Or should I change to another chart type from Pivot Chart ?

Anonymous
Not applicable
Author

Any suggestions ?

subathra
Partner - Contributor III
Partner - Contributor III

Hi try this,

sum({<year={$(=Max(year)-1)}>}[staff members])