Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

adding columns using fieldvalues

Hi all

I get tables like this:

column names are always the same.

fieldvalues in column Name always start with DigitsDotBlankspace

The rest differs every time

IDTextName
001Great1. Slovenia
001icecream2. Spain
002blodpudding1. Slovenia
003donald thrump2. Spain
002lollipop11. Finland

I whant to is to turn them into  tables lik this:

IDTextName1. Slovenia2. Spain11. Finland
001Great1. Slovenia1. Slovenia
001icecream2. Spain2. Spain
002blodpudding1. Slovenia1. Slovenia
003donald thrump2. Spain2. Spain
002lollipop11. Finland11. Finland

Any ideas?

3 Replies
marcelviegas
Creator II
Creator II

hi,

load*,if(Name='1. Slovenia','1. Slovenia') as '1. Slovenia',if(Name='2. Spain','2. Spain') as '2. Spain',if(Name='11. Finland','11. Finland') as '11. Finland';

Original_Table:

LOAD * INLINE [

    ID,Text,Name

001 ,Great, 1. Slovenia

001 ,icecream, 2. Spain

002 ,blodpudding, 1. Slovenia

003 ,donald thrump, 2. Spain

002 ,lollipop, 11. Finland

];

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Use the Generic Load prefix.

Generic Load ID, Name, Name....

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptPrefixes...

If you want to reassemble the tables into one, see the script at the end of this post. Use cases for Generic Load | Qlikview Cookbook

You'll also find lots of examples and discussion on generic load here in the forums.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

Anonymous
Not applicable
Author

Thanks for your help : )

Sorry for late answer.

/Måns