Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have 2 sets of locations from different spreadsheets but in different formats.
The first is in this format:
LISTA:
Europe,France,Germany,Greece,UK,Poland,South Africa,Turkey,Bermuda
|
The second list is in the format:
LISTB:
Europe
France
Germany
UK
Greece
Belgium
I have manged to great a string from list B to select data from List A but if List B has no data I can not make a full string to look into List A and collect the data.
So I need to look at selecting LIST A's string of data and splitting it by comma's then make LIST B look for the individual countries.
Is it concat and AGGR?
Thanks.
Something sort of this can be extended I feel, its working one way, means only shows fact data when all countries in a group are having data in fact table else don't show any data -
Dimension:
Load distinct *,subfield(GroupCountry,',') as Country;
LOAD *,substringcount(GroupCountry,',')+1 as GroupofFlag Inline [
GroupCountry
Europe,France,Germany,Greece,UK,Poland,South Africa,Turkey,Bermuda
Europe,France,Germany,Greece
Europe
](delimiter is '\n');
FactTable:
LOAD * Inline [
Country, GDP, Sales
Europe, 50, 25
Greece, 65, 32
France,40,25
Wales, 68, 31
Germany, 98, 50
UK, 90, 45
];
May be we need to use Triggers for the other side to work. Cause I am having this bad feeling that it is always going to work one way without trigger. Just food for thought