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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Compare two excel sheet and calculate how many rows are matching

Hi

 

I have 2 excel sources and data is as below. I want to check for each combination of App and Columns in Excel 1 matches with the combination in Excel 2 and come up with a table which show how many combinations are aligned.  

In this e.g. App A1 has 3 columns and they match with the 3 columns in Excel 2. But for App A2, C4 has a match but C5 doesnt have one. So App A1 is aligned 100%, 3 out of 3 are matching and A2 should be 50% as 1 out 2 match.

Please suggest how this can be accomplished? Thanks.

 

Excel 1  Excel 2
AppColumns  AppColumns
A1C1  A1C1
A1C2  A1C2
A1C3  A1C3
A2C4  A2C4
A2C5  A2C6

 

App% of Columns Aligned?
A1100
A250
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a measure like, But for this need to have a common  table with column app, joined to both tables

 

a measure like

countrows(Table1, [app], [column]) - countrows( except(summarize(Table1,[app], [column]), summarize(Table2,[app], [column]) ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @amitchandak - the solution worked fine, now got slightly different requirement. There can be Apps with '_Test', but this wont be available in excel 2. In this case we have to compare A1_Test with A1 and show as 100%. 

I tried to add a new column, trimmed '_Test' part and tried to check with entries in Excel 2. But it is not working as expected, it is considering A1_Test and A1 as A1. Need to display A1 and A1_Test as seperate entries in output. Any suggestions will be highly appreciated.

Thanks.

 

Excel 1  Excel 2  
AppColumns  AppColumns
A1C1  A1C1
A1C2  A1C2
A1C3  A1C3
A2C4  A2C4
A2C5  A2C6
A1_TestC1    
A1_TestC2    
A1_TestC3    

 

Expected Output

App% of Columns Aligned?
A1100
A250
A1_Test100

 

amitchandak
Super User
Super User

@Anonymous , Try a measure like, But for this need to have a common  table with column app, joined to both tables

 

a measure like

countrows(Table1, [app], [column]) - countrows( except(summarize(Table1,[app], [column]), summarize(Table2,[app], [column]) ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you @amitchandak. This helps.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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