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

Best Way to Implement a Filter for non Calculations:

I am trying to establish a fund balance based off a combination of 3 digit funds.  My current formula is this:

 

Balance = CALCULATE( SUMX ('UtilityCheck',[CY-AMT]),'Accounts'[Full Code] = "10400-0") +
                   CALCULATE( SUMX('UtilityCheck',[CY-AMT]),Accounts[Full Code] = "10520-0") -
                    CALCULATE( SUMX('UtilityCheck',[CY-AMT]),Accounts[Full Code] = "10521-0") -
                      CALCULATE( SUMX('UtilityCheck',[CY-AMT]),Accounts[Full Code] = "10570-0") -
                         CALCULATE( SUMX('UtilityCheck',[CY-AMT]),Accounts[Full Code] = "10571-0")
 
And to filter the funds I want I put a slicer on my page and check "621" & "821" which is from the table Funds and column fund number.
 
My question is how can I write a comphrenisve formula to get rid of the slicer and make room for more?
Any help is much apprecaited!
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You may try ALL function. It can ignore the filtering of the slicer.

For example,

vstephenmsft_0-1644309781370.png

Put the ID column in the slicer, then select B and C, my measure is to calculate the value of Full Code equal to 10400-0.

Measure = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Full Code]="10400-0"))

vstephenmsft_1-1644309855540.png

 

If you are still confused, please provide dummy data and expected results.

 

Best Regards,

Stephen Tao

 

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

You may try ALL function. It can ignore the filtering of the slicer.

For example,

vstephenmsft_0-1644309781370.png

Put the ID column in the slicer, then select B and C, my measure is to calculate the value of Full Code equal to 10400-0.

Measure = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Full Code]="10400-0"))

vstephenmsft_1-1644309855540.png

 

If you are still confused, please provide dummy data and expected results.

 

Best Regards,

Stephen Tao

 

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

amitchandak
Super User
Super User

@Anonymous , if you putting a slicer on table UtilityCheck or joined table, then that should work 

also you can simplify it

 

CALCULATE( SUM ('UtilityCheck',[CY-AMT]),filter('Accounts','Accounts'[Full Code] in{ "10400-0" ,"10520-0"))

- CALCULATE( SUM ('UtilityCheck',[CY-AMT]),filter('Accounts','Accounts'[Full Code] in{ "10521-0" ,"10570-0", "10571-0"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.