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
Rolosig
Helper I
Helper I

Include Filtered Items in Totals

Hi, it is possible in a pivot table in Excel to include filtered Items in totals so if you filter out a value the grand total will stay the same. Do you know if this is possible in Power bi or if it will be possible in the near future? Is there a simple dax code I could use if this is not possible?

 

Here is a link that shows how it's done in Excel: https://excelk.com/en/include-filtered-items-in-totals-en/

 

All the best,
Rolo

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Rolosig , you can try all, removefilters

 

calculate(sum(Table[value]),all(Table))

 

refer this for removefilters 

https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@Rolosig 

Create a measure this way:

Total = 
IF( 
    ISINSCOPE(Data1[City]), SUM('Data1'[Value]),
    CALCULATE( SUM('Data1'[Value]) , ALL(Data1[City]))
)

Fowmy_0-1598278111344.png

 

________________________

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

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube, LinkedIn

 



 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

amitchandak
Super User
Super User

@Rolosig , you can try all, removefilters

 

calculate(sum(Table[value]),all(Table))

 

refer this for removefilters 

https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak

Thank you I really appreciate your help, ALL worked in my case. 

Greg_Deckler
Super User
Super User

@Rolosig - Perhaps, you could possibly use ALL in your totals row. See if this helps:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

or this: https://community.powerbi.com/t5/Quick-Measures-Gallery/Matrix-Measure-Total-Triple-Threat-Rock-amp-...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.