Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

Mapping country

Hi all,

Gysbert Wassenaar

Antonio Mancini

I have 3 separate tables .

MD

MI

country codes

so  I need to create one column with region like below,how can I achieve  its like   for one chart I need to show region wise count. nd one chart for separate tables .  [in each table I have several columns but I have given only one column for time being in attached excel]

   

Region
EMEA
Banglor
United States of America
Melbourne
singapore
Budapa
20 Replies
soniasweety
Master
Master
Author

yes sunny,

both BB and Mi both are diff tables and am concatenating both this tables.

for UI  one dashboard I need to show both count

and one dashboard for each individual counts.

for that I crated flag.

sunny_talwar

Then if you are using ApplyMap in both the tables, then all you need is this

Dimension

Region

Expression

Count(Region)

soniasweety
Master
Master
Author

Sunny,

is it correct am doing?

MappingTable:
Mapping
LOAD Code,
Destination
FROM

(
ooxml, embedded labels, table is CountryCodes);

MI:
LOAD Co,
ApplyMap('MappingTable', Co, 'N/A') as Region
FROM

(
ooxml, embedded labels, table is MI);
concatenate
BB:
LOAD Country,

ApplyMap('MappingTable', Country, 'N/A') as Region
FROM

(
ooxml, embedded labels, table is BB);

here am adding one more table  and doing applymap is it correct or anything need to do?

sunny_talwar

May be do it like this

MappingTable:
Mapping
LOAD Code,
Destination
FROM

(ooxml, embedded labels, table is CountryCodes);

Table:
LOAD Co as Country,
ApplyMap('MappingTable', Co, 'N/A') as Region
FROM

(ooxml, embedded labels, table is MI);


Concatenate (Table)
LOAD Country,

ApplyMap('MappingTable', Country, 'N/A') as Region
FROM

(ooxml, embedded labels, table is BB);

soniasweety
Master
Master
Author

yeah sunny its working thank you. I will close this thread once I test with my original app.

Small doubt. : in each my table I have 20 columns is there  is it effect anything?

will I load each table along with above code is fine?

sunny_talwar

It should be fine just make sure that matching columns between the two tables are named with the same name just like I did for Co as Country

soniasweety
Master
Master
Author

Okay sunny,

Thanks for the right suggestions towards the accurate output

soniasweety
Master
Master
Author

hiSunny Talwar

I believe its working as expected but

my question is like  I have separate dahboards to display individual counts

if I use above code  I will get only  one column with region it will give the totl count of BB and MI

so can I use like this?

Table:
LOAD Co ,

Co as Country,

ApplyMap('MappingTable', Co, 'N/A') as Region

sunny_talwar

You mentioned you created flags? May be add Flag as your dimension?

soniasweety
Master
Master
Author

yes sunny,

I tried like above its working but is it cause any performance issue?