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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Abhilekh
New Member

Calculate Table

Hi, 

 

I am new to Power BI and I am trying to create a dashboard to check for data gaps across different IT systems. 

I have 2 tables with around 40 columns each. I need to find out if the value in Table1 is exactly the same as value in Table 2, If not then the rows with unmatching values should be stored in another table. 

For Eg: Table 1 ( Employee ID , Firstname, Lastname, country) 

            Table 2 ( Employee ID, Firstname, Lastname, country )

 

Table to Calculate: ( Only Rows that do not match)

CountryMismatch( Employee ID, Firstname, Lastname, Table1.Country, Table2.Country) 

 

Table 1 and Table 2 relationship exists on EmployeeID which is a unique value. 

 

The idea is to build the dashboard capturing the count of mismatching values but also to have data of mismatching values for Audit purposes. I was able  to implement above on SQL and Mysql but would like to learn doing it in PowerBI. 

  

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Abhilekh,

 

Please check out the demo in the attachment. The formula could be as follows.

Table =
SELECTCOLUMNS (
    FILTER (
        NATURALINNERJOIN ( 'Table1', 'Table2' ),
        'Table1'[Country] <> 'Table2'[Country]
    ),
    "EmployeeID", 'Table1'[Employee ID],
    "Firstname", 'Table1'[Firstname],
    "Lastname", 'Table1'[Lastname],
    "Table1 Country", 'Table1'[Country],
    "Table2 Country", 'Table2'[Country]
)

table

 

Best Regards,

Dale

Community Support Team _ Dale
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-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Abhilekh,

 

Could you please mark the proper answers as solutions?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Abhilekh,

 

Please check out the demo in the attachment. The formula could be as follows.

Table =
SELECTCOLUMNS (
    FILTER (
        NATURALINNERJOIN ( 'Table1', 'Table2' ),
        'Table1'[Country] <> 'Table2'[Country]
    ),
    "EmployeeID", 'Table1'[Employee ID],
    "Firstname", 'Table1'[Firstname],
    "Lastname", 'Table1'[Lastname],
    "Table1 Country", 'Table1'[Country],
    "Table2 Country", 'Table2'[Country]
)

table

 

Best Regards,

Dale

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.