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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
SIH007_1
Frequent Visitor

Strange error with calculation

Hi,

 

I have a problem with Power Query, I absolutely don't understand:

We get data from SAP which we store in a folder by month - below you see the import text for the single files - only query name and filename changed, the query was done once and then duplicated.

Then they were  appended by year and finally the 3 years were appended - in the totals queries there is only the one line of code you can see below, I only shortened the months statement a bit in the middle. 

Problem.png

My problem: in Power BI we realized that the numbers for November, 2021 were duplicated - just for November, 2021!

I had all queries' rows  counted, the numbers were perfect for all month and for all single-year queries, in the query Totals 2020 - 2022 the miscalculation all of a sudden appears. There I have double the amount of rows for November, 2021, and the entire query statement is shown above. I can't understand that logic! I finally solved the issue by removing duplicates from the entire table, but I would consider that only as a workaround.




2 ACCEPTED SOLUTIONS
jennratten
Super User
Super User

Hello - I recommend you take a closer look through the individual query results.  If they really are correct individually then the appended/summed result would be correct also.

If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.

Proud to be a Microsoft Fabric Super User

View solution in original post

Hi, thank you for your reply - problem was the Excel files generated from SAP - in 2 files the filter was set to the wrong year - that caused the problem 😞

View solution in original post

2 REPLIES 2
jennratten
Super User
Super User

Hello - I recommend you take a closer look through the individual query results.  If they really are correct individually then the appended/summed result would be correct also.

If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.

Proud to be a Microsoft Fabric Super User

Hi, thank you for your reply - problem was the Excel files generated from SAP - in 2 files the filter was set to the wrong year - that caused the problem 😞

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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