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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
prma7799
Master III
Master III

If else condition

Hi All,

I have table like below

ColA  ColB ColC ColD

1        0          0     0

0        1          0     0    

0        0          1     0    

0        0          0     1

and I want output like   

ColA  ColB ColC ColD

1                        

         1                     

                    1          

                          1

How to achieve it?

Thanks

PM

2 Replies
anbu1984
Master III
Master III

Do you want replace Zeros by Nulls?

Load If(ColA<>0,ColA) As ColA, ... From Table

NareshGuntur
Partner - Specialist
Partner - Specialist

Try this

LOAD Replace(A,0,'') as A,

Replace(B,0,'') as B,

Replace(C,0,'') as C,

Replace(D,0,'') as D

from XXX;

Cheers,

Naresh