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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Juliano845
Frequent Visitor

compare data 2 different data base an change data

Hi everyone,

 

Could somebody help me? 

 

I have to compare both tables and change Table 1 if state is different from Table 2

 

 

 

Table 1

Ticket number state
101opened
102closed
103opened

 

Table 2

Ticket numberstate
101closed
102closed
103closed

 

result:

Table 1

Ticket numberstate
101closed
102closed
103closed

 

1 REPLY 1
supremo_pdx
Frequent Visitor

It seems like Table 2 has the most recent value, so you could remove [state] from Table 1, merge Table 2 on [Ticket number] and expand and use the [state] column from Table 2 instead.

 

If that's not the case and you want to compare or show both, you could do a similar setup but add but change the names of the state on each table to [State 1] and [State 2], respectively, and merge Table 2 into Table 1 on [Ticket number] and expand [State 2]. Next, create a custom column using the following code: if [State 1] = [State 2] then [State 1] else [State 2]. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.