Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Afternoon folks,
I have the following Excel IF(AND()) formula and I've tried writing it as an expression in QV, replacing the cell references for expressions where applicable. It doesn't seem to like it however.
Could someone please convert the below to an expression, and advise how you do it?
=IF(D2<=0,1,IF(AND(C2<=0,D2>0),0,IF(AND(C2>0,D2>0),1-IF(D2/C2>1,1,D2/C2),"")))
Thanks in advance,
Gareth
=IF(D2<=0,1,
IF(C2<=0 AND D2>0,0,
IF(C2>0 AND D2>0,1-IF(D2/C2>1,1,D2/C2),0)))
=IF(D2<=0,1,
IF(C2<=0 AND D2>0,0,
IF(C2>0 AND D2>0,1-IF(D2/C2>1,1,D2/C2),0)))
Thanks Vineeth,
Can't believe how simple that was!
if you are coming from excel it will be easier for you to adopt QV
Hi,
Can you share your excel mock data with excel formula and expected output result column,
and condition you have try like below,
if(D2 <=0, 1,
if(c2<=0 AND D2>0,0,
if(C2>0 and D2>0,1,
1-if((D2/C2)>1,1,D2/C2),0)))
just and between ur two conditions instead of after if open bracket.
Hi,
I want to calculate If And function in Qliksense set analysis which is not working. For each key I will add 30.
if(Key=1 AND sum(A)<= sum({<key={$(1,)}>} Sales),Sum(A)/sum({<key={$(1)}>} Sales)*30+30,
if(Key=2 AND sum(A)<= sum({<key={$(1,2)}>} Sales),Sum(A)/sum({<key={$(1,2)}>} Sales)*30+60,0))
Its not working in set analysis
Hi
I want to calculate If And function in Qliksense set analysis which is not working. For each key I will add 30.
if(Key=1 AND sum(A)<= sum({<key={$(1,)}>} Sales),Sum(A)/sum({<key={$(1)}>} Sales)*30+30,
if(Key=2 AND sum(A)<= sum({<key={$(1,2)}>} Sales),Sum(A)/sum({<key={$(1,2)}>} Sales)*30+60,0))
Its not working in set analysis