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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Jeffreyjar
Helper II
Helper II

update a column value from different tables

Hello everyone, 

 

@AlexisOlson 

 

please help i have an issue

 

i want to update the column values(Numero Agents) of my APE 02 2022 table

Numero AgentsDDS_X1_SPLITDDS_CA_MPREMDDS_CA_QPREMDDS_CA_SPREMDDS_CA_APREMAPE per agents
A999990090,52000057332111997219160120000
A9999900912500071777140333274722300000
A999990090,53000086222168667330279180000
A999990090,52010057620112563220271120600
A999990090,52020057911113133221388121200
A999990090,535000100668197002385836210000
A799990210,51000002884445653331108055600000
A799990210,51000002884455653341108057600000
A799990210,550000144000282000552500300000
A799990210,51000002884455653341108057600000
A799990210,550000144000282000552501300000
A799990210,550000144000282000552501300000
A999990090,52000057333111999219165120000

 

with my columns(New Agents Codes and associate their names(EEAGTNAME)) of the table *agents list*

EAAGENTEAAGTNAMEEAADDR1EACITYEAFCREASTATUSNew Agents Codes
A99999009MOUAFFI SINDEU BRICE CEDRICK YAOUNDEA99901001AA99901001
A79999021ATSOL NDONGO NATHALIA YAOUNDEA79901001AA79901001

 

so that i could have this final data

Numero AgentsDDS_X1_SPLITDDS_CA_MPREMDDS_CA_QPREMDDS_CA_SPREMDDS_CA_APREMAPE per agentsNew Numero AgentsNames 
A999990090,52000057332111997219160120000A99901001MOUAFFI SINDEU BRICE CEDRICK
A9999900912500071777140333274722300000A99901001MOUAFFI SINDEU BRICE CEDRICK
A999990090,53000086222168667330279180000A99901001MOUAFFI SINDEU BRICE CEDRICK
A999990090,52010057620112563220271120600A99901001MOUAFFI SINDEU BRICE CEDRICK
A999990090,52020057911113133221388121200A99901001MOUAFFI SINDEU BRICE CEDRICK
A999990090,535000100668197002385836210000A99901001MOUAFFI SINDEU BRICE CEDRICK
A799990210,51000002884445653331108055600000A79901001ATSOL NDONGO NATHALIA
A799990210,51000002884455653341108057600000A79901001ATSOL NDONGO NATHALIA
A799990210,550000144000282000552500300000A79901001ATSOL NDONGO NATHALIA
A799990210,51000002884455653341108057600000A79901001ATSOL NDONGO NATHALIA
A799990210,550000144000282000552501300000A79901001ATSOL NDONGO NATHALIA
A799990210,550000144000282000552501300000A79901001ATSOL NDONGO NATHALIA
A999990090,52000057333111999219165120000A79901001ATSOL NDONGO NATHALIA

 

1 ACCEPTED SOLUTION

Create a new column using:

New Numero Agent = 
LOOKUPVALUE('table *agents list*'[New Agents Codes],'table *agents list*'[EAAGENT], 'APE 02 2022 table'[Numero Agents])

agent name.png

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

10 REPLIES 10
Jeffreyjar
Helper II
Helper II

It is working thanks

PaulDBrown
Community Champion
Community Champion

Sorry, I'm not sure what you mean. Can you expand on what else you need?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






this is the expected data sample that i want to look like

EEAGENT has old values. New Agents Codes are the new ones

 

So i want to return New Agents Codes values

 

Numero AgentsDDS_X1_SPLITDDS_CA_MPREMDDS_CA_QPREMDDS_CA_SPREMDDS_CA_APREMAPE per agentsNew Numero AgentsNames 
A999990090,52000057332111997219160120000A99901001MOUAFFI SINDEU BRICE CEDRICK
A9999900912500071777140333274722300000A99901001MOUAFFI SINDEU BRICE CEDRICK
A999990090,53000086222168667330279180000A99901001MOUAFFI SINDEU BRICE CEDRICK
A999990090,52010057620112563220271120600A99901001MOUAFFI SINDEU BRICE CEDRICK
A999990090,52020057911113133221388121200A99901001MOUAFFI SINDEU BRICE CEDRICK
A999990090,535000100668197002385836210000A99901001MOUAFFI SINDEU BRICE CEDRICK
A799990210,51000002884445653331108055600000A79901001ATSOL NDONGO NATHALIA
A799990210,51000002884455653341108057600000A79901001ATSOL NDONGO NATHALIA
A799990210,550000144000282000552500300000A79901001ATSOL NDONGO NATHALIA
A799990210,51000002884455653341108057600000A79901001ATSOL NDONGO NATHALIA
A799990210,550000144000282000552501300000A79901001ATSOL NDONGO NATHALIA
A799990210,550000144000282000552501300000A79901001ATSOL NDONGO NATHALIA
A999990090,52000057333111999219165120000A79901001ATSOL NDONGO NATHALIA

Create a new column using:

New Numero Agent = 
LOOKUPVALUE('table *agents list*'[New Agents Codes],'table *agents list*'[EAAGENT], 'APE 02 2022 table'[Numero Agents])

agent name.png

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Jeffreyjar
Helper II
Helper II

Thank you, the second solution worked for me,but you have done only for the names what about the codes the new ones

 

Jeffreyjar_0-1657536662655.png

 

Jeffreyjar
Helper II
Helper II

there is already a relationship between them, but it is more complicated than you think i just need a solution for the problem requested with an example if possible

 

If there is a relationship between the two tables,

 

 

 

2022-07-11.png

 

you can add a new column using:

Agent Name =
RELATED ( 'table *agents list*'[EAAGTNAME] )

agent name.png

If there isn't a relationship,

no relat.png

you can use:

Agent Name = LOOKUPVALUE('table *agents list*'[EAAGTNAME],'table *agents list*'[EAAGENT], 'APE 02 2022 table'[Numero Agents])

agent name.png

 



 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






rbriga
Impactful Individual
Impactful Individual

It is a matter of a join, or "merge queries" in the Query Editor.

1. Add this 2 sources as queries.

2. For the first table, go to the query editor and click "Merge Queries"

3. Merge the 2 queries based on Numero Agents in table 1 and EAAGENT in table 2

4. extend table 1 to hold New Numero Agents from table 2

 

See this page, under "combine queries".

-------------------------
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!

I cannot do that with power query because New Agents Codes is a calculated column

 

Dax functions(formulas) are needed

rbriga
Impactful Individual
Impactful Individual

How about creating a relationship between the two tables, based on Numero Agents in table 1 and EAAGENT in table 2?

You can then use the New Agents Codes in any tabe you display as a visual.

 

You can create a table using one of the table functiones, but the above solution should do.

-------------------------
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.