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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Update Changes data from 2 tables

Hi Teams,

I have 2 tables and I make the comparison between them. I added one more column called "Updated Comparation". If columns in  NewData table is different from OldData table, then "Updated Comparation" will update the  NewData[Last Updated] values. 

 

newData.pngolddata.png

 2 first rows the information is different so "Updatad Comparation" show the value. Since FirstNames are different from 2 tables, now I want to replace the FirstNames from Olddata by NewData. (ken => kenneth, bob => robert)

My code so far is bellow. How to I replace the values of FirstNames? Tks 

 

Updated Comparation = if(RELATED(NewData[CustomerId]) <> [CustomerId] || RELATED(NewData[First Name]) <> [First Name] || RELATED(NewData[Last Name])<>[Last Name] || RELATED(NewData[Customer Type]) <> [Customer Type] || RELATED(NewData[Last Updated]) <>[Last Updated], RELATED(NewData[Last Updated]))
 
 
1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

HI, @Anonymous 

Do you mean that you want to update the data in the original data column?

If so, you could not get it in power bi for now.

You could create the new column as amitchandak said, or use the same logic to create a New table.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

HI, @Anonymous 

Do you mean that you want to update the data in the original data column?

If so, you could not get it in power bi for now.

You could create the new column as amitchandak said, or use the same logic to create a New table.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

Try creating columns like this and then use them in calculation

 

Max customer = MAXX(filter(Sales,Sales[Order Id]='Item'[Max Sales order id] && Sales[item_id]='Item'[Item ID]),Sales[Customer ID])

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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