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

Become a Certified Power BI Data Analyst! Prepare for Exam PL-300 with expert-led live sessions. Get registered!

Reply
GriRim
Frequent Visitor

Wrong results on subtotals in Analyze in Excel

Hi all,

 

There is simple sales report. Semantic model - star schema. Fact table in the middle and dimensions around. Relationships one to many, exept Customer table  - both (I needed to changed it, since Excel couldn't filter out data properly).

We connected this model to Excel and weird things start to happen.

Somehow Customer hierarchy II (customer dimension) is not working properly.

 

If I list all Customer Hierarchy II and sum just Revenue (revenue column and select sum function), I'm getting amount for Allocate me and Not assigned:

GriRim_1-1748445639583.png

If I just filter out those two values, I have different result (the right ones, that I see in Power BI report):

GriRim_2-1748445827532.png

 

Does someone else encountered similar issues? Have you found the work around?

7 REPLIES 7
v-csrikanth
Community Support
Community Support

Hi @GriRim 

It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered?
If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
Looking forward to your reply!

Best Regards,
Community Support Team _ C Srikanth.

Hi @v-csrikanth   the isue sill exists with singe - direction relationship and using excel sum or Dax sum - also doesn't bring any changes. Since we have correct values in Power BI, I have recomendet business not to use Excel with this connection.

v-csrikanth
Community Support
Community Support

Hi @GriRim 
Thanks for reaching out to Fabric Community.
Please check the below table that might helps to clear out your doubts.

Recommendation Why it helps
Use single-direction relationships Removes ambiguity in filtering, especially in Excel
Create explicit DAX measures e.g. Total Revenue = SUM(Fact[Revenue])) Ensures filter context is applied properly
Avoid using Excel's implicit aggregation Implicit SUM/COUNT in Excel doesn't always honor model filters correctly
Use Power BI for complex filtering/reporting Power BI visuals interpret the data model better
Test your Excel report thoroughly with different filters Catch inconsistencies early

 

You must keep the bidirectional relationship due to business logic, consider writing your measure like:

Total Revenue (Filtered) =CALCULATE(SUM(Fact[Revenue]), REMOVEFILTERS(Customer[Customer Name])  // Or restrict to valid customers)

Or even

Total Revenue (Clean) =CALCULATE(SUM(Fact[Revenue]),NOT(ISBLANK(Customer[Customer ID]))  // Exclude 'Not assigned' scenarios)

If the above information helps you, please give us a Kudos and marked the Accept as a solution.

Best Regards,
Community Support Team _ C Srikanth.

That being so, you can add the filters to your CALCULATE expression, like

 

       CALCULATE (
            [Sales Amount],
            FILTER ( ALL ( 'Product'[Color] ), 'Product'[Color] IN { "Red", "Blue" }
 
--Nate 
GriRim
Frequent Visitor

Thanks @nathancwatkins  and @Omid_Motamedise for you replay and just for the record I do have respect for Italians 🙂

I've changed to relationship to single, and issue still here.

What I managed to found is that this table is filtered by Customer Group (from stame Customer Dim table). And somehow amount of Not assigned - 223,065 is not responding to filtered value and 56,97 is amount wothout filterd Customer Group value. During the screenshots I haven't done anything, just expanded and collapsed the row and amount differs.

GriRim_0-1748502276172.png

GriRim_2-1748502491088.png

 

 

Omid_Motamedise
Super User
Super User

The issue you're seeing with Customer Hierarchy II is almost certainly due to the bidirectional relationship you created between the Customer dimension and the Fact table. While this change may have fixed one issue in Excel filtering, it's introducing ambiguity and potential filter propagation problems.

In Excel, especially when using PivotTables connected to a semantic model, bidirectional relationships can lead to unexpected totals — like those you’re seeing under "Allocate me" and "Not assigned". This happens because Excel handles filter context differently from Power BI visuals.

If my answer helped solve your issue, please consider marking it as the accepted solution. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h

Sounds like you've fallen victim by not heeding the Italian's advice: "Do not use bidirectional relationships unless you really understand the impact that they will have on your calculations." Best option is to fix your semantic model. Otherwise, try using  CALCULATE(SUM('Sales'[Revenue]), USERELATIONSHIP('CustomerTable'[Customer], 'Sales'[Customer]))

 

Also, do you really need to have an hierarchy? If your semantic model is tight, you can drag the right fields onto the page just like pivot tables. 

 

Or something like that.

 

--Nate

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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

Top Solution Authors