Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Find out columns with same value automatically or during import

Hello,

I have a really old data list which I want to import and it needs to get sorted out, because a lot columns contain the same failue.

First possibility is to find it out by manual search.

Maybe it's possible to do this during the process of importing or automatically?

For example:

Header 1Header 2Header 3
Content1TEXTEXAMPLE125
Content1Another Example90
Content1-12
Content1Text10
Content1Try4
Content1Different Text2
Content1-7
Content1Header 2 Text8

Like in this example Header 1 contains the same value. So it could be cut out because I know it all contains the same.

I searched the forum and found an article about "Deleting Double Entries" but here it's something different.

Information: The columns I import include text and numbers.

Thanks in advance.

Alex

Tags (3)
1 Solution

Accepted Solutions
mov
Not applicable

Re: Find out columns with same value automatically or during import

Alex,

I don't have an automated solution for you, but maybe this will help.
Load everything.  Bring two system fields on the screen - $Rows and $Field (not $Fields).  $Rows says how many distinct values exist in each field.  So, if you select $Rows=1, you'll see what fields are useless.
Next step is either remove them from the load script, if reasonably possible, or drop them at the end of the script.

Regards,
Michael

4 Replies
mov
Not applicable

Re: Find out columns with same value automatically or during import

Alex,

If I understand correctly what is your need, you simply do not load Header1 column.

Regards,

Michael

Not applicable

Re: Find out columns with same value automatically or during import

Hi Michael, the list I have to import contains thousands of columns and I'm looking for a way to find them automatically. Sorry if I explained it a bit complicated.

Thanks in advance

Alex                   

mov
Not applicable

Re: Find out columns with same value automatically or during import

Alex,

I don't have an automated solution for you, but maybe this will help.
Load everything.  Bring two system fields on the screen - $Rows and $Field (not $Fields).  $Rows says how many distinct values exist in each field.  So, if you select $Rows=1, you'll see what fields are useless.
Next step is either remove them from the load script, if reasonably possible, or drop them at the end of the script.

Regards,
Michael

Not applicable

Re: Find out columns with same value automatically or during import

Thank you very much Michael, I will try this tomorrow at work! ANd tell you afterwards if I could handle it.

Thank you!

Cheers

EDIT: It was the right way to do it. Thanks!