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

Subtract relative data of two years

I created a graphic which showes the relative time (compared two the whole working time) was used during a year.

As a final result, I'd like to see as a graphic the delta between these two years, so relative result of a product in 2011 - same product for 2010. Or to say it very easy, the result of the subtraction of corresponding colours.

Important additional information:

1) the values to which they are related (total time per year is not a constant !) but a given value in a table

2) the sum of the times used for the different products does not equal the total working time over the corresponding year.

Can this be done in the graphic itself, or should a virtual table be created to solve this issue.

Thanks in advance for the solutions

1 Solution

Accepted Solutions
Not applicable
Author

Hi Brugst

Do you just mean you want something like eg sum of sales for 2011 - sum of sales 2010? You can use set analysis in the expression to just select a year. EG

=sum({<Year={"2011"}>} Sales) - sum({<Year={"2010"}>} Sales)

will subtract the sales for a product, as a dimension  in 2010 from the exact same product in 2011.

Is this what you need?

Erica

View solution in original post

2 Replies
Not applicable
Author

Hi Brugst

Do you just mean you want something like eg sum of sales for 2011 - sum of sales 2010? You can use set analysis in the expression to just select a year. EG

=sum({<Year={"2011"}>} Sales) - sum({<Year={"2010"}>} Sales)

will subtract the sales for a product, as a dimension  in 2010 from the exact same product in 2011.

Is this what you need?

Erica

Not applicable
Author

Hi Erica,

It works. I tried something similar before, but forgot to use the curved brackets around {<year>}.

Thanks a lot for the information !