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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
sreekanth2208
Partner - Contributor
Partner - Contributor

Transpose a column and add missing columns

Hi,

I'm a new bee to Qlikview, Could you please help me with one situation ?

I have a table with two column(Column-1) with multiple values like:

Column-1            Column-2

-------------             ------------

X                               1

Y                                2

Z                                3

 

I have transposed this column and got as below

X        Y         Z

1         2         3

but yeah, here is my situation, 

Where sometimes table consists of only 2 records as 

X            1

Y            2

 

and i want to add the missing records through QV script by checkng whether the field Z is available or not, if not available add a column "Z" and if not available and corresponding value as null and if available do nothing.

 

Could you please help us on this.

1 Reply
Brett_Bleess
Former Employee
Former Employee

The only thing of which I can think is to load into a temp resident table then reload and use the Peek() function to check if Z is there or not, maybe the Len() function may work too, not sure:

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/Inter...

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/Strin...

Likely need some further info and maybe an example data file in order for others to chime in on this one.

You can also have a look around the Design Blog area to see if you can find something there that may help too:

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.