Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a really difficult problem:
I want to calculate in this way:
if column1 = A,B,C
and if (A=A(comlumn2);B=B (comlumn2);C=C(comlumn2) then Value(column3)*1; else do Value(column3)*1,1;)
if column1 = D then Value(column3)*1
So there are two if sentences.
Thank you for helping!
If you need a better explanation - just tell me! 🙂
try this:
If( Town1='Berlin', Value, If(Town1=Town2, Value, Value * 1.1))
assuming '1,1' is your typing mistake and you meant '1.1'
Yes, please explain a bit better.
if you want to do nested if-Statements, here as a good tool:
http://www.qlikblog.at/tools/Nested-If-Generator.html
Hope this helps a little bit
try like this way
if column1 = D then Value(column3)*1 else
if column1 = A,B,C
and if (A=A(comlumn2);B=B (comlumn2);C=C(comlumn2) then Value(column3)*1; else do Value(column3)*1,1;
example of nested if--
if(Value='5',X,
if(Value='4',Y,
if([Indicator Number]='7' and Value='3',Z,
if(([Indicator Number]='8' or [Indicator Number]='9') and Value='2',ABC,
if(Value='1',A,
if(Value='2',P,Q))))))
Ok, here is my next try:
I have a table with one value and two columns of towns:
Value | Town1 | Town2 | Result i want | |
3 | M | M | 3 | |
4 | FFM | FFM | 4 | |
5 | M | FFM | 1,1*5 | |
6 | M | FFN | 1,1*6 | |
754 | FFM | M | 1,1*754 | |
3 | FFM | FFM | 3 | |
23 | M | FM | 1,1*23 | |
5 | Berlin | Berlin | 5 | Berlin is always *1 |
56 | Berlin | FFM | 56 | Berlin is always *1 |
6 | M | M | 6 |
So If the Town1 and the Town 2 is not the same I want to multiply the value with 1,1 !
If it is the same i want the same value => multiply with 1.
Berlin should not be affectet and always be multiplied with 1
Hope that helps!
Ok, here is my next try to explain it:
I have a table with one value and two columns of towns:
Value | Town1 | Town2 | Result i want | |
3 | M | M | 3 | |
4 | FFM | FFM | 4 | |
5 | M | FFM | 1,1*5 | |
6 | M | FFN | 1,1*6 | |
754 | FFM | M | 1,1*754 | |
3 | FFM | FFM | 3 | |
23 | M | FM | 1,1*23 | |
5 | Berlin | Berlin | 5 | Berlin is always *1 |
56 | Berlin | FFM | 56 | Berlin is always *1 |
6 | M | M | 6 |
So If the Town1 and the Town 2 is not the same I want to multiply the value with 1,1 !
If it is the same i want the same value => multiply with 1.
Berlin should not be affectet and always be multiplied with 1
Hope that helps!
try this
if(Town1=Town2 or Town1='Berlin',Value,11*Value)
try this:
If( Town1='Berlin', Value, If(Town1=Town2, Value, Value * 1.1))
assuming '1,1' is your typing mistake and you meant '1.1'
If(Town1 = 'Berlin', Value,
If(Town1 =Town2, Value, Value * 1.1))