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: 
beneldridge
Partner - Contributor
Partner - Contributor

Bringing in data from another column if blank

Hi,

Can someone help me with the coding to bring data in from another column if there is a blank cell in the column I am trying to fill?

Example would be how can I bring Jack and Jill into column A rather than me manually updating the download!

Thanks,

Ben

Column AColumn B
John
Jack
Joe
Jill
4 Replies
tresesco
MVP
MVP

Try like:

Load

          [Column B],

          If( Len(Trim([Column A]))=0, [Column B], [Column A])   as [Column A]

beneldridge
Partner - Contributor
Partner - Contributor
Author

Hi Tresesco,

Thanks for replying, when I use this coding I am getting a error message:

Error in expression: ')' expected

Do you know why this is?

Thanks,

Ben

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

See the attachment.

There is the code:

tmp:

LOAD If(Len(Trim([Column A])) = 0, [Column B], [Column A]) as Modified,

    [Column B],

    [Column A]

FROM

[https://community.qlik.com/thread/318252]

(html, codepage is 1257, embedded labels, table is @1);


Result:

Screenshot_3.jpg

Anonymous
Not applicable

Hi Ben,

As per mindaugasbacius solution you can achieve this thing in back-end as well as at front-end with given expression. !