Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table year vs. current year

Hi,

I hav a pivot table with year as dimension, sum (sales) is my expression. I tried to create a second expressions which shows
the year vs. the current year

Year | Sales | Sales vs. Current year

2009 ....

2010

2011

Is this possible? Before does'nt fullfill my needs.
Thanks for your help.

Kind Regards

3 Replies
johnw
Champion III
Champion III

I'm not sure quite what you're after. Sales for that year as a percentage of current year, for instance? Something like this?

sum(Sales)/sum({<Year={$(=year(today()))}>} Sales)

Not applicable
Author

Hi John,

I tried your expression but in this case I only get a value if the dimension year is the same as the year(today). I know that the values are excluded by the table dimenstion itself. I'm trying to show the difference between eg. 2009 and the current year (2011) or 2010 and the current year for each customer.
is this possbile?
Thanks for help

Regards

Not applicable
Author

Hi,

I think I've got it.... sum({$<Year = {'2010'}>} total <"CustomerID"> Sales)