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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mpuck
Frequent Visitor

Grand Total Not Correct after Using REMOVEFILTERS

Hi, 

I am new to Power BI but I am constantly learning. I have tried so many different ways (posts, Youtube, etc) of solving this issue and am having no luck.  Any help would be greatly appreciated.

 

I am trying to create a drill down to item level data to include items purchased by a vendor selected in the summary, the purchase amounts of those items and the sales amounts of those items. I used removefilters in the sales formula to remove the "source no." from the drill through filter. The source no is the vendor no or the customer no depending on the document type. 

This works fine for the line totals but the grand total is the sum of all items for the time period. 

 

mpuck_0-1692977802852.png

Please see my pbix file here: TestFile 

4 REPLIES 4
technolog
Super User
Super User

I hope this message finds you well. I've noticed that this solution remain unresolved. If any of you have managed to find a resolution to the issue, I kindly request that you share your solution for the benefit of the entire community. Alternatively, if you're still facing challenges, please do let us know as well.

Your insights and updates will greatly assist others who might be encountering the same challenge.

mpuck
Frequent Visitor

I tried using a SUMX formula and referencing my sales measure and it appeared to work but in the my real file if the vendor has multiple items and one of those items doesn't have a purchase for the time period, then the sales amount is not on that item row.  See below.  The Sales by Item column is correct, but the grand total is incorrect. The SUMX column grand total is correct, but the sales for the items without a purchase in that time period are omitted. 

mpuck_0-1692981943383.png

 

Anonymous
Not applicable

Hi @mpuck 

You can try the following code.

Measure =
SUMX ( VALUES ( 'Table'[Item No_] ), [Sales] )

 

Best Regards!

Yolo Zhu

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

Hi ,

I tried that and the grand total works but it is ignoring sales for items that didn't also have a purchase in the same time period.  Below is a screenshot from my original file. YOu can see that there are sales for that item that show in the original formula but they do not show with the SUM X formula . 

 

 

mpuck_0-1693235164222.png

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.