Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
3 tables: table A, B and C.
In table A old accounts, table B the translation from old to new accounts, table C new accounts.
Table A: Account, Amount, Year, Period (data for years 2008, 2009, 2010)
Table B: Old Account, New Account
Table C: New Account, Amount, Year, Period (data for year 2011, 2012, etc.)
Overview
New Account 1, Amount, Year, Period
New Account 2, Amount, Year, Period
New Account 1, Amount, Year, Period
How do I setup the report/tables that they only reflect the new accounts (where some really are new accounts and some are translations of old accounts).
Any help is appreciated!
Hello,
I understand that you can load old accounts values into new ones, so you are going to report on 2008, 2009, 2011, etc..
Then, load Table B something like
Then, load Table C with something likeAccountsOldNewMap:MAPPING LOAD OldAccount, NewAccount FROM Source;
mapping old accounts into new accounts and getting the results you are looking for. Hope this is what you are expecting.Table C:LOAD ApplyMap('AccountsOldNewMap', OldAccount) AS NewAccount, Amount, Year, Period FROM Table A
Hello,
I understand that you can load old accounts values into new ones, so you are going to report on 2008, 2009, 2011, etc..
Then, load Table B something like
Then, load Table C with something likeAccountsOldNewMap:MAPPING LOAD OldAccount, NewAccount FROM Source;
mapping old accounts into new accounts and getting the results you are looking for. Hope this is what you are expecting.Table C:LOAD ApplyMap('AccountsOldNewMap', OldAccount) AS NewAccount, Amount, Year, Period FROM Table A
Thank you very much for your help.
This is the statement now in Table B:
AccountsOldNewMap:
MAPPING LOAD mid(Mfgvalue,6,6) AS OldAccount, mid([Oracle value],8,7) AS NewAccount
FROM
This is the statement now in Table C:
NewMap:
LOAD ApplyMap('AccountsOldNewMap', OldAccount) AS NewAccount
FROM
This is the error message:
Field not found - <OldAccount>
What am I doing wrong?
Hi,
Following your script above, you are using
as the old account number. In BS_Details.qvd file you have to have a old account number you want to change for its correspondent in the Map table. That is the value you have to use as paramenter in ApplyMap. Does that Mfgvalue exist in that BS_Details.qvd file?mid(Mfgvalue,6,6)
It does now.
However I now get some of the old accounts (6 positions) and some of the new accounts (7 positions).
Have looked everywhere, don't have a clue.....
Hi,
ApplyMap uses the table returning one value depending on the expression passed on to the map. If there are no matches, you can even create a default map which will match any of the values you don't want to work with (as they don't have correspondence in the mapping table) and you may use this to load a third table clean of any records but those who actually exists in the mapping table, which are supposed to be in your reports (as they are the new accounts). Changing the code for
you can easily group all "Whatever String Otherwise" meaning those old accounts not existing in your mapping table.ApplyMap('AccountsOldNewMap', OldAccount, 'Whatever String Otherwise') AS NewAccount, OldAccount as OriginalAccount,
Now you can forget them (set analysis, conditionals), or check your map table should each and any of your old accounts have a new name (and having that new name is always different).
I'll check this during the work.
Thank you for your help.