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
pschn1993
Frequent Visitor

DAX Filter

I am needing to apply the below filters to my entire PBI report and am having trouble with the the DAX filter. I am using three different columns in the same query. 

pschn1993_0-1655392340110.png

 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @pschn1993 ,

 

Based on your description, you see that you can try to use the alexpected function in the formula to keep the results of the external filtering context for the check weigher, date, and check weigher zone fields.

At this point, the only external filtering context is the color:

vhenrykmstf_0-1655885180598.png

When I add more filters, I can keep the results of the filters on the corresponding columns with the allexpected function.

amount =
CALCULATE (
    SUM ( FactInternetSales[SalesAmount] ),
    ALLEXCEPT ( DimProduct, DimProduct[Color], DimProduct[Class] ),
    ALLEXCEPT ( DimDate, DimDate[FiscalYear] )
)

vhenrykmstf_1-1655885492373.png

If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


Best Regards,
Henry


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
v-henryk-mstf
Community Support
Community Support

Hi @pschn1993 ,

 

Based on your description, you see that you can try to use the alexpected function in the formula to keep the results of the external filtering context for the check weigher, date, and check weigher zone fields.

At this point, the only external filtering context is the color:

vhenrykmstf_0-1655885180598.png

When I add more filters, I can keep the results of the filters on the corresponding columns with the allexpected function.

amount =
CALCULATE (
    SUM ( FactInternetSales[SalesAmount] ),
    ALLEXCEPT ( DimProduct, DimProduct[Color], DimProduct[Class] ),
    ALLEXCEPT ( DimDate, DimDate[FiscalYear] )
)

vhenrykmstf_1-1655885492373.png

If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


Best Regards,
Henry


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

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. I cannot use screenshots of your source data.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.