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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Filter Removal - DAX

Good afternoon folks

I have a calculation in DAX that I want to build very simply, Income - Expense, but I don't want the external filter Expense/Income to influence my DAX, how do I do it?

Below is an image of the filters I want you to consider and what I don't want. So I want to calculate Result = Income - Expense.

 

Edgarmassa_0-1688748765820.png

 

5 REPLIES 5
Anonymous
Not applicable

@MFelix e @Jaywant 

 

I would need to calculate in a variable what is expense, calculate in another variable what is expenses and return the result = revenue - expense, but disregarding the same column of expense and revenue from the external filter

MFelix
Super User
Super User

If it's the entire table that should not be impacted by that filter just remove the interaction from the slicer to the visual.

 

If it's only the last column use the option REMOVEFILTERS in your calculation:

https://dax.guide/removefilters/


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

@MFelix 

 

it's only in the column ("measure") of the visual, but the removefilters I can even remove the external revenue/expense filter, but I need to know how much was revenue, how much was expense to subtract revenue - expense and bring it to the visual, do you know how it could be done?

 

Look what I did in the "Test 1" column as you told me

 

 

Edgarmassa_0-1688752604546.png

 

Jaywant
Regular Visitor

If you want to calculate the result as Income - Expense while ignoring external filters on Expense and Income, you can use the following DAX formula:

 

Result =
CALCULATE(
    SUM('YourTable'[Income]) - SUM('YourTable'[Expense]),
    ALLEXCEPT('YourTable', 'YourTable'[Result])
)

 

In this formula, replace 'YourTable' with the actual name of your table that contains the Income, Expense, and Result columns.

The SUM('YourTable'[Income]) - SUM('YourTable'[Expense]) calculates the difference between the total income and total expense.

The ALLEXCEPT('YourTable', 'YourTable'[Result]) removes all the filters applied to the table, except for the Result column, ensuring that the calculation is performed independently of any filters on the Expense and Income columns.

 

This way, the calculated result will not be influenced by external filters on Expense and Income, and it will provide the desired outcome of Income - Expense.

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

 

 

Anonymous
Not applicable

@Jaywant 

 

I can't do it this way because my data structure is as per the image below

 

Amount Column, another expense and income column and etc.

 

Edgarmassa_1-1688752749792.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.