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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
jam17
Helper I
Helper I

Remove Filter but preserve filter information in measure

I posted this question and received some useful information that helped me understand measures and such.  However, I realize now I forgot an important detail.

I'm using a slicer to select "customer", and want to display a card that shows total sales for that customer's "account".  What I failed to mention is there are multiple accounts.
Example

CustomerAccountSale AmountYear
John DoeSuperContractors$202024
John DoeSuperContractors$152024
Tommy BoySuperContractors$302024
Tommy BoySuperContractors$202023
Jane SeymourBeautiful Builds$352024
John DoeSuperContractors$152023
Jane SeymourBeautiful Builds$402024

 

What I'm looking to display is, based on a Page Filter for Year - say selected on 2024 for example:
Slicer Select: John Doe
Customer Card: $35
Account Card: $65

If I switch the filter to 2023 and keep it on John Doe, the cards would update to:
Customer Card: $15
Account Card: $35

The solution I recieved seems to work, but assumes all entries in the table are the same account.

AccountTotalSales =

CALCULATE(

    SUM('Sales'[SalesAmount]),

    ALL('CustomerTable'[CustomerID])

)

How do I simultaneously have it know John Doe's account, but summarize more than just John Doe?

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@jam17,

 

Try this measure. The VALUES function captures the Account filter context.

 

Account Total Sales = 
CALCULATE (
    SUM ( Sales[Sale Amount] ),
    ALL ( CustomerTable ),
    VALUES ( CustomerTable[Account] )
)

 

Since Account is an attribute of Customer, I included Account in CustomerTable:

 

DataInsights_0-1725635807198.png

 

DataInsights_1-1725635920066.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@jam17,

 

Try this measure. The VALUES function captures the Account filter context.

 

Account Total Sales = 
CALCULATE (
    SUM ( Sales[Sale Amount] ),
    ALL ( CustomerTable ),
    VALUES ( CustomerTable[Account] )
)

 

Since Account is an attribute of Customer, I included Account in CustomerTable:

 

DataInsights_0-1725635807198.png

 

DataInsights_1-1725635920066.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you.
This made me realize I needed to clean up my tables and relationships, and once I did that this was super easy and completely worked!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.