Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi folks
I have the following expression
='The sum of sales between 2006 and 2010 is '& sum({$<Year = {">= 2006 <= 2010"}>}Sales) which is working fine
but
I have created two variables in the settings->variable overview with default values 2004 and 2010 vmin and vmin and wrote a expression in a text box as
='The sum of sales between 2006 and 2010 is '& sum({$<Year = {">= $(vmin) <= $(vmax)"}>}Sales)
I am not getting the correct answer , the sum function is not considering 2006 and 2010 rather it is taking all the years
actually my need is
I want to have two input boxes which has to take min and max years from the users and I want to use those variables in a text box
as above. I took transact file sample of Qlikview for this.
can anybody suggest me a solution for this.
Hi,
Your expression is correct, just check if variables are correct.I have used the same expression and it's working perfectly.
='Sales '&sum({$<Year={">=$(vMin)<=$(vMax)"} >}Sales)
Regards,
Navdeep
Hi,
Your expression is correct, just check if variables are correct.I have used the same expression and it's working perfectly.
='Sales '&sum({$<Year={">=$(vMin)<=$(vMax)"} >}Sales)
Regards,
Navdeep
Yeah you are correct I missed v in vMax in original expression.
Thanks
Hi navdeep,
This time I took two variables vmin = min({1} Year) and vmax = max({1} Year)
and I used these two for input boxes , to my strange the input boxes are showing the same expressions after '=' but the not 2004(min) and 2010(max) and my expression sum({$<Year = {">= $(vmin) <= $(vmax)"}>}Sales) is showing 0.
any suggestions
I attached the qvw to my original post.
Hey got the solution finally , I have to use the expression as follows
='The sum of sales between '& $(vMin)&' and '&$(vMax)&' is '& sum({$<Year = {">= $(=$(vMin))
<= $(=$(vMax))"}>}Sales)