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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Replace values

Hi,

Background

I have two spreadsheets. Table 1 is a 'master' document and table 2 is a change log that records any changes to the master document.

All rows have a unique code number that links the two spreadsheets. E.g. If there is a R01 in the master document changes will be recorded in the change log next to R01.

Problem

I am able to identify through DAX expression whether there is any changes recorded in the change log but need to be able to replace the values in 'master document' with the changes recorded in the change log.

AR1989_0-1666073258204.png 

E.g. if the risk description in table 1 is changed in table 2 I need a forumla that identifies 1.) there is a change, and 2.) that the risk description in table 1 should reflect that change

 

2 ACCEPTED SOLUTIONS

if you created relationship between two tables you can try this

Column = if(RELATED('Table 2'[Risk description change])="",'Table 1'[Risk description],RELATED('Table 2'[Risk description change]))
 
if don't have the relationship, you can try this
 
Column 2 =
var _update=maxx(FILTER('Table 2','Table 1'[Risk ID]='Table 2'[Risk ID ]),'Table 2'[Risk description change])
return if(_update="",'Table 1'[Risk description],_update)
 
1.PNG
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

9 REPLIES 9
Anonymous
Not applicable

Sorry this just gives lots of errors. Can you recommend a DAX code?

if you created relationship between two tables you can try this

Column = if(RELATED('Table 2'[Risk description change])="",'Table 1'[Risk description],RELATED('Table 2'[Risk description change]))
 
if don't have the relationship, you can try this
 
Column 2 =
var _update=maxx(FILTER('Table 2','Table 1'[Risk ID]='Table 2'[Risk ID ]),'Table 2'[Risk description change])
return if(_update="",'Table 1'[Risk description],_update)
 
1.PNG
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

This works great-thank you

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




ryan_mayu
Super User
Super User

@Anonymous 

could you pls provide the sample data(not the table visual) of the two tables that you mentioned and the expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Table 1

Risk IDRisk description
R01There is a risk that the puppy won't have a nice temperment
R02There is a risk that the puppy will make a mess
R03There is a risk that the puppy will chew expensive shoes
R04There is a risk that the puppy won't be potty trained 
R05There is a risk that the puppy won't be able to be trained

 

Table 2

Risk  ID Risk description change
R01Cavoodle puppy might not have a nice temperment 

what's the definition of change? 

We have records in table 2?

why in your screenshot , the status of R02 is also change?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Definition of change if if content in table 2 is different to content in table 1 there is a an entry in the change log, which means the content in table 1 needs to be updated. 

 

So ideal situation in the tables above would be that either table 1 or perhaps a new table would look like this:

 

Risk IDRisk description
R01Cavoodle puppy might not have a nice temperment 
R02There is a risk that the puppy will make a mess
R03There is a risk that the puppy will chew expensive shoes
R04There is a risk that the puppy won't be potty trained 
R05There is a risk that the puppy won't be able to be trained

 

@Anonymous 

you can do this in PQ.

1.PNG2.PNG

3.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors