Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
aruneshgupta
Contributor III
Contributor III

Qlik app logic to replace all column values with 0 or null and keep value only for one column

Dear All,

I could appreciate if you could help me to create one logic in script.

Actually I have below table and want to replace all values with 0 or null for all columns and keep values only in one column for respective dimension values. 

 

dim1 x y z a b
d1 2 2 3 4 5
d2 2 4 6 8 15
d3 3 6 9 12 25
d11 4 8 12 16 35
d21 4 10 15 20 45
d23 3 12 18 24 55
d31 5 14 21 28 65
d32 3 16 24 32 75

 

 

Output 

 

dim1 x y z a b
d1 0 0 0 0 5
d2 0 0 0 0 15
d3 0 0 0 0 25
d11 0 8 0 0 0
d21 0 10 0 0 0
d23 0 12 0 0 0
d31 5 0 0 0 0
d32 3 0 0 0 0

 

 

Thank you in advance!

Regards,

Arun

Labels (2)
0 Replies