Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone
I use the exact same datasets, distributed by region. As a result, each region has its own data connection. Now I would like to read in data from different data connections.
Currently in the following way:
SALES:
LOAD
Sales,
Amount,
...,
'regionA' as DataConnection
FROM [lib://tranformation regionA/Sales.qvd]
Concatenate (SALES)
LOAD
Sales,
Amount,
...,
'regionB' as DataConnection
FROM [lib://tranformation regionB/Sales.qvd]
Is it possible to do this with a loop where I change a piece (region...) in the connection?
I must also clearly indicate from which connection the data comes (regionA as DataConnection) to be used in section access.
Thanks in advance
Hi Jelle,
Do you know in advance which regions there are? If so, you can try this:
// Add your regions here
Regions:
Load * Inline [
Region
A
B
C
];
For each Region in FieldValueList('Region')
// Just for knowing, doesn't have an impact
Trace Load Region: $(Region) ;
SALES:
Load
*
FROM [lib://tranformation region$(Region)/Sales.qvd]
;
Next Region
You don't need a concatenate function while it auto concatenates.
Jordy
Climber
Hi Jelle,
Do you know in advance which regions there are? If so, you can try this:
// Add your regions here
Regions:
Load * Inline [
Region
A
B
C
];
For each Region in FieldValueList('Region')
// Just for knowing, doesn't have an impact
Trace Load Region: $(Region) ;
SALES:
Load
*
FROM [lib://tranformation region$(Region)/Sales.qvd]
;
Next Region
You don't need a concatenate function while it auto concatenates.
Jordy
Climber