Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I Have the following fields in my load script
LOAD
ZZMLST_ZAEHL1
,
ZZMLST_ZAEHL2
,
ZZMLST_ZAEHL3
,
ZZMLST_ZAEHL4
,
ZZMLST_ZAEHL5
,
I want to create one field from them called Milestone that I can use in my dashboard
It depends how do you want to build that field, it could be like -
ZZMLST_ZAEHL1 & '-' & ZZMLST_ZAEHL2 &...... as Milestone
LOAD ZMLST_ZAEHL1 & ZZMLST_ZAEHL2 & ..... as Milestone Resident ....
Each of the fields has multiple records and I want to create 1 field to display all of the records
e.g
ZZMLST_ZAEHL1 may contain :
10
20
30
ZZMLST_ZAEHL2 may contain:
40
50
60
I want to create a field so I can see
10
20
30
40
50
60
Hi,
look at cross table concept. Might be helpful to you.
Regards
For vCounter = 1 to 5
LOAD
'$(vCounter)' as fieldtype,
zzmlst'$(vCounter)' as Milestone
FROM ...
next
That should perfectly work. You will read the initial table 5 times.
I added a field named fieldtype so you can still see from which field the data came from
If the table contains a lot of data, you should first read the table in memory and then perform the for...next loop as reading it from memory is a lot faster than through ODBC.
Try this script
Table1:
CrossTable(Field, Data)
LOAD RowNo() as Row1,
ZZMLST_ZAEHL1,
ZZMLST_ZAEHL2,
ZZMLST_ZAEHL3,
ZZMLST_ZAEHL4,
ZZMLST_ZAEHL5;
LOAD * INLINE [
ZZMLST_ZAEHL1, ZZMLST_ZAEHL2, ZZMLST_ZAEHL3, ZZMLST_ZAEHL4, ZZMLST_ZAEHL5
16, 45, 89, 35, 52
85, 69, 12, 40, 10
18, 50, 62, 79, 40
71, 100, 37, 84, 79
19, 32, 13, 25, 97
16, 76, 47, 40, 39
];
NoConcatenate
Load Data as Milestone Resident Table1;
DROP Table Table1;