Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
srikantj
Creator
Creator

If clause with multiple fields

Hi qlikss,

I have 2 fields.

A & B

A   B

1 5

2 0

0 4

I want to create third column as comment 

As 

If A=0, A is zero if B=0, B is zero

Final table should look like this

A   B comment

1 5

2 0  B is zero

0 4  A is zero.

Someone help me with code

Labels (1)
1 Reply
Taoufiq_Zarra

@srikantj 

if(A=0 or B=0,'zero') as comment

like

load *,if(A=0 or B=0,'zero') as comment inline [
A,B
1,5
2,0
0,4
];

output:

Taoufiq_Zarra_0-1613593856201.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉