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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AkshayManke
Advocate I
Advocate I

Compare Data (Codes, Amounts, Other Details) From Two Data Sources

Hi,

 

I have two excel files which are containing data File: 1.xslx & 2.xlsx. There are some fields are common for example: Name, Code, Type and Amount. There may be differnece in the amounts in each file for example 1.xslx for a specific user, the amount is 100 and in the 2.xlsx the amount may be 110. 

 

What i want is: i want to check the see where the difference is. i tried but somehow i am unable to get the desired results.

 

Below some snaps for reference. Help would be really appreciated.

Base Data Example.

Base Data.JPG

 

 

 

 

 

 

 

 

 

Below the relationship.

relationship.JPG

 

 

 

 

 

 

 

 

 

The result i am getting.

current result.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Expected Results

results.JPG

 

 

 

 

Many Thanks in advance.!!!

 

Regards,

Akshay

 

2 ACCEPTED SOLUTIONS
v-robertq-msft
Community Support
Community Support

Hi, @AkshayManke 

According to your description and sample picture, It’s hard to find out the true reason for the problem. But I think it’s related to the relationship between the two tables. Can you try to connect the two tables directly without the intermediate table? The foreign key can be [Code] or [Name] and the filter direction should be “Both”.

If you still have a problem after these tryings. Would you like to post some sample Excel file or pbix file(without sensitive data) so that we can find the original cause and help you to solve it in advance?

Thanks very much!

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

Hi, @AkshayManke 

OK, just reply to me and share the sample pbix file if this solution doesn’t work.

If this solution works, you can consider accepting my reply as a solution.

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

6 REPLIES 6
v-robertq-msft
Community Support
Community Support

Hi, @AkshayManke 

According to your description and sample picture, It’s hard to find out the true reason for the problem. But I think it’s related to the relationship between the two tables. Can you try to connect the two tables directly without the intermediate table? The foreign key can be [Code] or [Name] and the filter direction should be “Both”.

If you still have a problem after these tryings. Would you like to post some sample Excel file or pbix file(without sensitive data) so that we can find the original cause and help you to solve it in advance?

Thanks very much!

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

@v-robertq-msft 

Hi Robert,

 

Thanks for the help on the issue. I did not get chance to test the case however thanks for marking that answer as acceptance. I will test and will get back to you with results.

 

Thanks again.!

Akshay

@v-robertq-msft 

Hi Robert,

 

Thanks for suggesting one more option. I will try the same and will get back with the results. If needed, will share the pbix file for further analysis.

 

Thanks and Regards,

Akshay

Hi, @AkshayManke 

OK, just reply to me and share the sample pbix file if this solution doesn’t work.

If this solution works, you can consider accepting my reply as a solution.

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

@AkshayManke , why code to Table 2 is many to 1, It should be one to many; correct that.

 

Afte that it should simply sum(Table1[Amount]) - Sum(Table2[Amount])

@amitchandak 

 

Hi Amit,

 

Thanks for helping on the query. I tried the suggested steps by you but not getting the desired results. I have added the test case only for demonstration however the actual data is large and having different columns in the 1 and 2 files. The problem here is the values are not matching. I may be taking a wrong approach. could you please help further?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.