Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have loaded Postcodes and State into table "PostCodeMapping"
PostCodeMapping table:-
Postcode State
200 ACT
221 ACT
801 NT
851 NT
1023 NSW
1030 NSW
I now need to add the State the to resident UserTable. I have the postcode in the resident table to use in the lookup. how do i return postcode into the resident table?
Cheers.
Hi,
If you want to map you state field to another table, first create mapping table with the Prefix of 'Mapping'
and use ApplyMap in your Resident table.
so, your code should be like this..
StateMappingTable:
MAPPING LOAD Postcode,
State
FROM
PostCodeStateMapping.xlsx
(ooxml, embedded labels, table is Sheet1);
if this not your issue, can you provide the sample data?
Try
PostCodeMappinTable:
Mappling Load Postcode, State from Source;
New:
Load Fields,Postcode
ApplyMap('PostCodeMappingTable',Postcode,'Unknow') as State
From Source;
Hi Laura,
see the below example ..
PostCodeMapping:-
Mapping LOAD Postcode
State
FROM
-----(qvd);
Usertable:
LOAD Postcode,
xyz,
ApplyMap ('PostCodeMapping ',Postcode,'NA') as State
FROM
---- (qvd);
Hi Settu,
thanks Settu but don't understand.
I have already have the postcode and state in a table called "PostCodeMappinTable:". so do i do the "NEW" bit in the Resident script or in a separate script? This is what i have done so far:-
StateMappingTable:
LOAD Postcode,
State
FROM
PostCodeStateMapping.xlsx
(ooxml, embedded labels, table is Sheet1);
concatenata(UserSummary)
Load Fields, Postcode
ApplyMap('StateMappingTable',Postcode,'Other')as State;
First create the mapping table.
PostCodeMapping:
Mapping Load
Postcode,
State
from (path).
Now call this mapping table into the resident usertable.
Use syntax:
ApplyMap('PostCodeMapping',postcode) as State
Alternatively you can use:
lookup(fieldname, matchfieldname, matchfieldvalue [, tablename])
Returns the value of fieldname corresponding to the first occurrence of the value matchfieldvalue in the fieldmatchfieldname.
Hi,
If you want to map you state field to another table, first create mapping table with the Prefix of 'Mapping'
and use ApplyMap in your Resident table.
so, your code should be like this..
StateMappingTable:
MAPPING LOAD Postcode,
State
FROM
PostCodeStateMapping.xlsx
(ooxml, embedded labels, table is Sheet1);
if this not your issue, can you provide the sample data?
got it. thanks Settu.
if i want to show each state on a separate line in the line chart how do i do this please?
I.e. I have member numbers on the y axis and the months are on the bottom along the x axis. i want to show the member numbers by state (each state being on its own line)?
Firstly load the mapping table (before loading any data concerning UserSummary table):
StateMappingTable:
Mapping Load
Postcode,
State
From PostCodeStateMapping.xlsx
(ooxml, embedded labels, table is Sheet1);
Next step is to map the information in UserSummary table with StateMappingTable.
You should just add additional line in the UserSummary table:
ApplyMap('StateMappingTable', Postcode, 'Unknown') as State,
The UserSummary table must have the field name Postcode.
Have you tried put your state also in your dimension (x-axis)?
Dimension: Month and State
Expression : Count(Members)
do you have a sample data?
does "value on data points" still work with multiple lines? I've tried but the numbers do not show as they do on a single line graph?