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
CastCS
New Member

Power Pivot and Power BI Desktop not returning the same result

Hi,

 

I have a very odd problem that I don't understand. I have built a power pivot model in Excel and imported it into Power BI Desktop without any changes to the model. The problem is that the model in Power BI Desktop shows different figures compared to the ones the excelfiles calculates and that is because the measure counts some rows twice. The measure counts the number of IDs in the primary key field so there can't be any duplicates and when I go to Edit Queries and filter on one of the IDs that are counted twice only one row is returned. 

 

The measure is very straightforward, Registered sales= CALCULATE(COUNT([ID]);USERELATIONSHIP(dim_Calendar[Date];Installation[SalesDate])).

 

An easy solution is to use DISTINCTCOUNT instead, but that doesn't explain why the modell in Excel returns one figure and in Power BI Desktop another. Has anyone experienced anything similar and found a explanation / solution?

 

EDIT - Power BI Desktop shows the same figures as the Excel data model untill it is updated then the difference occurs.

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @CastCS,

 

I'm not able to reproduce the issue like yours. Can you share your Excel workbook for us? Or could you share detail steps for us to reproduce the issue?

 

Best Regards,
Qiuyun Yu

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

Hi,

 

Sorry, can't share the file with you, contains to much sensitive data.

 

The problem seems to occur when I merge queries, the numbers of rows in the left table are correct after the merge but for some reason there are duplicates of some rows which also means that others disappers.  This does not happen in the data model in the Excel file, and as I wrote, when filtering for one of the rows with duplicates in the data view, only one row is shown and it is also calculated as one row. 

 

The syntax of the merge below, does that help you to understand this?

 

    #"Merged Queries" = Table.NestedJoin(#"Changed Type",{"InstallationID"},AAASale,{"InstallationID"},"NewColumn",JoinKind.LeftOuter),

    #"Expanded NewColumn" = Table.ExpandTableColumn(#"Merged Queries", "NewColumn", {"SalesDate", "Company"}, {"AAASale.SalesDate", "AAASale.Company"}),

 

Best regards,
Caj

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.