Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am creating a table where there is a list of accounts that can sometimes belong to a master account.
I have an 'Account Name' field, an 'Account ID' field and a 'Master Account ID' field, but I do not have a 'Master Account Name' field.
I want to create a table that displays an 'Account Name' column and a 'Master Account Name' column if an account is under a master account.
To help represent the problem, I am providing a small fictitious sample and images of what I would like to achieve.
The sample :
What I have:
What I would like to achieve :
I tried to achieve this with this expression:
=If(match([ID Compte principal],[ID Compte]),[Nom Compte])
Unfortunately, it returns nothing
Do you have an idea?
Thanks in advance for the help
Hi @Freazord ,
You can use applymap function in script:
MTable:
Mapping Load
AccountID,
AccountName
from your_table;
NewTable:
load *,
applymap('MTable', [Master Account ID] ) as [Master Account Name]
from your_table;
I hope it can help.
Best Regards
HI @Freazord
You can left join the data back
Left Join
Load
[Account ID] as [Master Account ID],
[Account Name] as [Master Account Name]
Resident Table; //Table being the original table name
WHERE LEN(Master Account ID) > 0;
Hi @Freazord ,
You can use applymap function in script:
MTable:
Mapping Load
AccountID,
AccountName
from your_table;
NewTable:
load *,
applymap('MTable', [Master Account ID] ) as [Master Account Name]
from your_table;
I hope it can help.
Best Regards
Hello @agigliotti ,
Thank you for the solution. It works perfectly.
You made me discover an incredible function that is applymap.
Best Regards
Hello @Mark_Little ,
Unfortunately, I didn't manage to achieve what I wanted with the Left Join.
It may be that the error is on my end, but having tested the applymap solution that works, I didn't push your solution further.
I thank you for your help.
Best Regards