
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
Field1 | Attribute | Value |
A | xx | 1034 |
A | yy | 4076 |
A | zz | 34 |
B | xx | 2345 |
B | yy | 2435 |
where the attributes are actually field names...my desired table looks like this:
Field 1 | xx | yy | zz |
A | 1034 | 4076 | 34 |
B | 2345 | 2435 | -- |
If you could even provide the name of the script function required to pull this off, that would be a big help. Thanks!
- « Previous Replies
-
- 1
- 2
- Next Replies »

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Generic Load is the correct answer.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is what I was looking for. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I agree with shumailh, I would use a pivot table and drag the values to the descired locations


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great answer! Thank you for solving my problem

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Alessandro,
Same Script i was use but table not found error comes

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
exactly what I wanted !!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?

- « Previous Replies
-
- 1
- 2
- Next Replies »