Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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????
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
you mean, vMaxYear = max(PayRollYear)?
And also, where dao I create these variables?
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
Thanks a lot!
I am using Qlikview, and if I do as you said, it's giving the same value for both, current and previous.
Here we go.
BR
Serhan
???
Hello,
Open it in QlikView and just copy the formula. That's all.
BR
Serhan