Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ValeriaBonini
Partner - Creator
Partner - Creator

Sum of values in a year

Hi, I have a table like this:

Name       Category     Value     MyYear(numeric format)

a                 1                      10           2021

a                 2                      20           2022

b                 1                      10            2021

c                 1                       25           2022

 

I would like to create a table like this:

Name       Category     Value in Year 2021           Value in Year 2022

a                   1                   10

a                   2                   -                                                 20

b                   1                    10

c                   1                   -                                                  25

 

 

I tried like     

sum({<MyYear={'=2021'}>} value)

sum({<MyYear={'=2022'}>} value)

 

but it doesn't work....any suggestions?

1 Solution

Accepted Solutions
Or
MVP
MVP

The equal sign isn't necessary (and in this case, it actually prevents the result you want).

sum({<MyYear={'2022'}>} value)

Of course, in this case, what you're describing might be better served being a pivot table with the Year being pivoted.

View solution in original post

1 Reply
Or
MVP
MVP

The equal sign isn't necessary (and in this case, it actually prevents the result you want).

sum({<MyYear={'2022'}>} value)

Of course, in this case, what you're describing might be better served being a pivot table with the Year being pivoted.