Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want to filter for the following, can one of you let me know if there is a way to do this.
If((Flag = 1 and Year = 2013) and (Flag = 0 and Year =2014), Sum(sales))
I'm not sure how to do this in Qlikview.
Thanks
Hi,
Try this:
sum({<Flag={'1'}>*<Flag={'2013'}>*<Flag={'0'}>*<Year={'2014'}>}sales)
HTH
Sushil
Where you want to filter?
If it is at UI level you can derieve a flag in Script and provide the Flag as Filter.
You can try this:
=sum(if(Flag=1 and Year=2013,Sales,if(Flag=0 and Year=2014,Sales)))
(Flag = 1 and Year = 2013) and (Flag = 0 and Year =2014) is a contradiction, Flag cannot be 1 and 0, Year cannot be 2013 and 2014.
I believe, you should do it sum them separately:
If((Flag = 1 and Year = 2013) and (Flag = 0 and Year =2014), Sum(sales))
sum({<Flag={1},Year={2013}>}sales) + sum({<Flag={0},Year={2014}>}sales)
OR
sum({<Flag={1},Year={2013}>+<Flag={0},Year={2014}>}>}sales)
Hope this was helpful
Thanks,
Singh
Wouldn’t this be equal to
Where Flag = 1 and Year = 2013 and Flag = 0 and Year = 2014? I’m expecting Where (Flag = 1 and Year = 2013) and (Flag = 0 And Flag = 2014)
Filter an expression.
James
Below is the example
Client Year Flag
12345 2013 1
12345 2014 0
12346 2013 1
12346 2014 1
I want to identify only Client 12345. Is there any way to identify that client in Qlikview?
Thanks
Venkatachalam.N
Use this:
Only({<Flag={1},Year={2013}>}Client) + Only({<Flag={0},Year={2014}>}Client)