Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

help in expression

Hello got the following combo chart

Untitled.png

the blue bar is the count of versions created and the red one is the number of versions deactivated

the line is the difference between the 2 accumulated

now what I want is the following :

if the user selects 2004 then the line should display 28 currently I'm getting the following:

Untitled.png

how can I get the previous six and show 28 instead of 22?

Please advise

Message was edited by: Ali Hijazi

I can walk on water when it freezes
1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi,

try expression like

If(Year=Max(Year),RangeSum(Above(Sum({<Year=>} a)-Sum({<Year=>} b),0,RowNo())))

View solution in original post

9 Replies
Anonymous
Not applicable

Please elaborate on your question  'previous six and show 28 instead of 22?'



MayilVahanan

Hi

Hope it helps

Calculating rolling n-period totals, averages or other aggregations

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable

if you are using the accumulation check box then there is nothing to accummulate as you only have 1 year selected

if you are accumulating by yourself you should check your formula

for the line it should look like

Count({<Youryearfield={'<=$(=Youryearfield)'}>}created-inactive)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

I'm guessing  your cat chewed on that expression. You'll have to replace it with a cat-proof expression.

Given the amount of information you've given this guess of mine is as good as most other guesses posted above.


talk is cheap, supply exceeds demand
ali_hijazi
Partner - Master II
Partner - Master II
Author

what is cat-proof expression?

I can walk on water when it freezes
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

One that proofs that your cat can't chew it.

How about you tell us what expression you're using now for that line? Or better, post a qlikview document that demonstrates the problem. I'd expected you'd know to give that sort of information by now.... after four years of asking questions here.


talk is cheap, supply exceeds demand
ali_hijazi
Partner - Master II
Partner - Master II
Author

user selects 2004

in 2004 the difference is 22

plus 6 of 2003 then the result should be 28 and not 22

I can walk on water when it freezes
antoniotiman
Master III
Master III

Hi,

try expression like

If(Year=Max(Year),RangeSum(Above(Sum({<Year=>} a)-Sum({<Year=>} b),0,RowNo())))

ali_hijazi
Partner - Master II
Partner - Master II
Author

check Attached qvw

I can walk on water when it freezes