Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Row values as fields (opposite of crosstable?)

Hey guys,

I'm doing a little more QV development these days (getting my feet wet with basic data modeling, etc.)

I have a table like this:

Field1AttributeValue
Axx1034
Ayy4076
Azz34
Bxx2345
Byy2435


where the attributes are actually field names...my desired table looks like this:

Field 1xxyyzz
A1034407634
B23452435--


If you could even provide the name of the script function required to pull this off, that would be a big help. Thanks!

17 Replies
Highlighted
Not applicable

Generic Load is the correct answer.

Highlighted
Not applicable

You could try something like the following:

TableA:

Load

     Field1,

     Attribute,

     Value1 & '_' & Value2 & '_' & Value3 as ConcatValues

From......;

let zFieldCount = FieldValueCount('Attribute');

for z = 1 to $(zFieldCount)
      let zFieldName = FieldValue('Attribute',$(z));   

      load
          Field1,
           subfield(ConcatValues,'_') as [$(zFieldName)]
      resident TableA
      where Attribute = '$(zFieldName)';

next z

Highlighted
Creator
Creator

This is what I was looking for. Thanks!

Highlighted
Creator
Creator

I agree with shumailh, I would use a pivot table and drag the values to the descired locations


Highlighted
Creator
Creator

Great answer! Thank you for solving my problem

Highlighted
Creator
Creator

Dear Alessandro,

Same Script i was use but table not found error comes

Highlighted
Not applicable

exactly what I wanted !!

Highlighted
Contributor II
Contributor II

Hi,

This script works until the loop to join evertything togheter. It won't apply the left join, so i end up with a lot of tabells. What can i do?