Forum Discussion

pschn1993's avatar
pschn1993
Frequent Visitor
4 years ago
Solved

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. 

 

  • 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:

    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] )
    )

    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.

2 Replies

  • v-henryk-mstf's avatar
    v-henryk-mstf
    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:

    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] )
    )

    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.