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

Display data depending of the year

Hello everyone,

I am using Qlik Sense Desktop and I have a Graph that display data trend from last year to date.

The problem is I would like to have 2 Graphs one on top of each others and comparing Jan 2015 with Jan 2016, Feb 2015 with Feb 2016 and so on... I don't want a dual column comparison.

When I click on my first Graph, I am using the Edit Expression where I will put my function there but after trying many different things, I am starting to have white hair Keep in mind that I am new to Qlik.

Any help will be really appreciated!

Eric

12 Replies
Not applicable
Author

Thanks Sangram,

I was able to make the data showing for everything over 2016 with this:

=Sum({$<Date={'>01/01/2016'}>}[$Rev])

Now my challenge is to show the data starting in 2015 and end before 2016.

I looked at the examples on the link you sent and this is what I was thinking of:

Sum({<Date={">=$('01/01/2015')<=$('06/06/2015')"}>} [$Rev])

The issue is it shows all the data from 2015 to 2016

Note that I also tried:

=Sum({$<Date={'>01/01/2015'}>}[$Rev]) and I have the same result.

Eric

Not applicable
Author

OK, not sure why my first test didn't work but now it is with this

Sum({$<Date={'<01/01/2016'}>}[$Rev])

So now I have my 2 graphs comparing the 2015 data with the 2016 data

Thanks a lot Sangram for your patience

Eric

reddy-s
Master II
Master II

Hi Eric,

Try this.

Sum({<Date={">=$('01/01/2015')<=$('31/12/2015')"}>} [$Rev])


Thanks,

Sangram.