Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have problem on expression syntax. New on using QBAR-QlikView.
if((Age >= 0) and (Age<= 30),OpenBalance*1,0)
Can somebody help me with the code expression.
I think I miss SUM but i dont know the code.
Thanks in advance
May be this?
if((Age >= 0 and Age<= 30,OpenBalance*1,0)
or
Sum(Aggr(if((Age >= 0 and Age<= 30,OpenBalance*1,0), Type))
Hi Anil Thank you for your reply.
I dont know what's wrong on this sum. here is the snap
You need to include this condition inside aggregation function so that to aggregate your data with respect to your dimension
=sum(if((Age >= 0) and (Age<= 30),OpenBalance*1,0))
It's always better to write set analysis
=sum({<Age={">=0<=30"}>}OpenBalance*1)
Try this?
Sum(Aggr(If(Age >= 0 and Age <= 30, OpenBalance * 1, 0), [Customer.Name]))
Hi Kushal Bad field names:
Age & OpenBalance is a Expression Column
try this
sum(aggr(sum({<Age={">=0<=30"}>}OpenBalance)*1+sum({<Age-={">=0<=30"}>}OpenBalance)*0,[Customer.Name]))
Hi Sir Anil, The expression is OK. but the result comes "0".