Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
Generic Load is the correct answer.
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
This is what I was looking for. Thanks!
I agree with shumailh, I would use a pivot table and drag the values to the descired locations
Great answer! Thank you for solving my problem
Dear Alessandro,
Same Script i was use but table not found error comes
exactly what I wanted !!
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?