Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
durgabhavani
Creator III
Creator III

Help me to concat the records?

Hi All,

Please advice me to concat the records.

find my data and expected output below

My Data

   

IDNameAttribute
101VenkatHigh
102SatishHigh
102SatishLow
103SureshHigh
104RamLow
105KavyaHigh
105KavyaLow
105kavyaMedium
106Ravi
106RaviHigh
106RaviMedium
107kavyaMedium

Expected Output:

   

IDNameAttribute
101VenkatHigh
102SatishHigh,Low
103SureshHigh
104RamLow
105KavyaHigh,Low,Medium
106RaviHigh,Medium
107kavyaMedium

Thanks in advance.

Durga

1 Solution

Accepted Solutions
sunny_talwar

Sample script

Table:

LOAD ID,

  Name,

  Concat(If(Len(Trim(Attribute)) > 0, Attribute), ',') as Attribute

Group By ID, Name;

LOAD * INLINE [

    ID, Name, Attribute

    101, Venkat, High

    102, Satish, High

    102, Satish, Low

    103, Suresh, High

    104, Ram, Low

    105, Kavya, High

    105, Kavya, Low

    105, kavya, Medium

    106, Ravi,

    106, Ravi, High

    106, Ravi, Medium

    107, kavya, Medium

];

Capture.PNG

View solution in original post

8 Replies
sunny_talwar

May be like this

LOAD ID,

           Name,

           Concat(Attribute, ',') as Attribute

FROM....

Group By ID, Name;

sunny_talwar

Sample script

Table:

LOAD ID,

  Name,

  Concat(If(Len(Trim(Attribute)) > 0, Attribute), ',') as Attribute

Group By ID, Name;

LOAD * INLINE [

    ID, Name, Attribute

    101, Venkat, High

    102, Satish, High

    102, Satish, Low

    103, Suresh, High

    104, Ram, Low

    105, Kavya, High

    105, Kavya, Low

    105, kavya, Medium

    106, Ravi,

    106, Ravi, High

    106, Ravi, Medium

    107, kavya, Medium

];

Capture.PNG

durgabhavani
Creator III
Creator III
Author

Perfect!. Its working.....

durgabhavani
Creator III
Creator III
Author

One minor issue found in my original application. few values are showing as blanks instead " - ". Some are showing - values. I guess blank values are null values.

How to achieve this?

sunny_talwar

How to achieve what? I am not sure I understood the issue

durgabhavani
Creator III
Creator III
Author

Hi Sunny,

Sorry for delay response. Please find the sample application.

I have used straight table as required in my original application.

I have added one record in the sample applicaton and reloaded. when we export table to excel from front end, I am expecting - symbol for the record Hari (108).

Please advice.

hanks,

Anil_Babu_Samineni

Like this?

Capture.PNG

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
durgabhavani
Creator III
Creator III
Author

Thanks Anil.

It's working.. I tried in wrong way.