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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Correct row totals in visuals when applying several filters

Hi,

I'm having problems getting a correct row total on a field.

I researched a bit and it appears to be a known problem.

I've been looking at some solutions, while still struggling with the syntax to be honest, but it's not working.

My main problem is that there are several filters applied to the page.

Let me describe the setup:

Table "Sales"

Field to total: "ActualSales" (decimal) from the underlying data source Sales

Filters:

- Each page is for a different Sales Agent, so there's a SalesAgent field and a page filter on SalesAgent is being applied to all Visuals (specific value per page)

- There is a month filter on a calendar (also applying to all visuals on the page), filtering out the month(s) on InvoiceDate

What measure(s) should I use so that get a correct total of ActualSales?

Thx a million for your help!

1 ACCEPTED SOLUTION
Sahir_Maharaj
Super User
Super User

Hello @Anonymous,

 

Can you please try this:

Total ActualSales = CALCULATE(SUM(Sales[ActualSales]), ALL(Sales))

By using the "Total ActualSales" measure with the ALL function applied to the Sales table, you can disregard the filters on the SalesAgent field and the month filter while calculating the total. This should provide an accurate total of ActualSales, considering all the data in the Sales table, regardless of the filters applied on the page.

 

Do not hesitate to let me know if you might need further assistance.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

View solution in original post

1 REPLY 1
Sahir_Maharaj
Super User
Super User

Hello @Anonymous,

 

Can you please try this:

Total ActualSales = CALCULATE(SUM(Sales[ActualSales]), ALL(Sales))

By using the "Total ActualSales" measure with the ALL function applied to the Sales table, you can disregard the filters on the SalesAgent field and the month filter while calculating the total. This should provide an accurate total of ActualSales, considering all the data in the Sales table, regardless of the filters applied on the page.

 

Do not hesitate to let me know if you might need further assistance.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.