Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
erric3210
Creator
Creator

Understand If Condition

Hi All,

 

I need to understand the difference between 1st & 2nd expression in the image below.

I don't understand how 1st expression is working. Generally, we write some condition inside If condition and there is True and false values based on it but in 1st expression there are multiple if conditions without any true values.

Here is the dataset:

LOAD * INLINE [
Name, Article, Category, Value
ABC, Soap, Cat-A, 300
ABC, Phone, Cat-B, 1000
ABC, Car, Cat-C, 4000
ABC, ElectrCnics, Cat-C, 2000
ABC, Jewellery, Cat-C, 3000
XYZ, Electronics, Cat-C, 7000
XYZ, Car, Cat-C, 5000
XYZ, Phone, Cat-B, 2000
];

Community - If Condition.png

Regards,

Eric

Labels (5)
1 Reply
Or
MVP
MVP

There are, in fact - true conditions.

If the first condition is true, evaluate the second condition.

If the second condition is true, evaluate the third condition.

If that is true, CatA. Otherwise, CatB.

If either of the first conditions is false, null is returned (as there is no else section for either).