
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Current year count vs Previous year count
I have these fields in my database, PayRollYear and PayRollMonth and EMPNO.
I want to create a combo chart, that shows the count of employees in the present year vs the previous year. Present year would be a bar chart, and previous year would be a line chart, month being the dimension. Any ideas????
- « Previous Replies
-
- 1
- 2
- Next Replies »

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
- Create a variable something like vMaxYear=max(Year).
- Another variable, PrevYear = vMaxYear-1
- Comcbo chart. 1 Dimension, Month; 2 Expressions:
sum({<Year='$(vMaxYear)'>}Expression1)
sum({<Year='$(vPrevYear)'>}Expression1)
BR
Serhan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you mean, vMaxYear = max(PayRollYear)?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And also, where dao I create these variables?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes.
Sorry this is Qlik Sense though. You cannot create variables as in Sense.
Instead ;
sum({<Year={'$(=max(PayRollYear))'}>}Expression1)
sum({<Year={'$(=max(PayRollYear)-1)'}>}Expression1)
BR
Serhan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using Qlikview, and if I do as you said, it's giving the same value for both, current and previous.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here we go.
BR
Serhan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
???

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Open it in QlikView and just copy the formula. That's all.
BR
Serhan

- « Previous Replies
-
- 1
- 2
- Next Replies »