# If..then..elseif..else..end if

if..then kontrol ifadesi, bir veya daha fazla mantıksal koşula bağlı olarak farklı yolları takip etmesi için kod yürütmesini zorlayan komut seçim yapısıdır.

Kontrol ifadeleri genellikle kod yürütme akışını kontrol etmek için kullanılır. Grafik ifadesinde bunun yerine if koşullu işlevini kullanın. Daha fazla bilgi için bkz. [if - kod ve grafik fonksiyonu](https://help.qlik.com/tr-TR/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ConditionalFunctions/if.htm).

Söz Dizimi:

If condition then

[ statements ]

{ elseif condition then

[ statements ] }

[ else

[ statements ] ]

end if

if..then deyimi bir kontrol ifadesi olduğundan ve bu nedenle noktalı virgülle veya satır sonuyla bittiğinden, bu deyimin dört olası cümlesinin her biri (if..then, elseif..then, else ve end if) satır sınırını geçmemelidir.

Bağımsız Değişkenler:

Bağımsız Değişkenler

| Bağımsız Değişken | Açıklama |
| --- | --- |
| condition | True veya False olarak değerlendirilebilecek mantıksal bir ifade. |
| statements | Bir veya daha fazla Qlik Sense kod deyiminden oluşan herhangi bir grup. |

Örnek 1:

`if a=1 then`

> `LOAD * from 
>  abc.csv;` `SQL SELECT 
>  e, f, g from tab1;`

`end if`

Örnek 2:

`if a=1 then; drop table xyz; end if;`

Örnek 3:

`if x>0 
 then`

> `LOAD * from 
>  pos.csv;`

`elseif 
 x<0 then`

> `LOAD * from 
>  neg.csv;`

`else`

> `LOAD * from 
>  zero.txt;`

`end 
 if`

## Daha fazla bilgi

* [End](https://help.qlik.com/tr-TR/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlStatements/End.htm)