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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Varun51
Regular Visitor

How to add 2 Different Dimension Condition in Filter Expression

HI,

 

Would like to 2  Different Filter conditions in FIlter expression like below . is it possible ?

 

any help would be highly appreciated

 

in below DAX would like to add condition from another table Category = "Produce") 

 

Filter Measure = CALCULATE([Tot Sales Measure], FILTER( Products, Products[ProductName]= "Tofu" || cat))
 
Thanks,
Varun
1 ACCEPTED SOLUTION

Hi @Varun51 ,

Please try like this:

Filter Measure =
CALCULATE (
    [Tot Sales Measure],
    FILTER (
        Products,
        Products[ProductName] = "Tofu"
            || MAX ( Category[Category Name] ) = "Produce"
    )
)

 

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
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

4 REPLIES 4
amitchandak
Super User
Super User

Try like

Filter Measure = CALCULATE([Tot Sales Measure], FILTER( Products, Products[ProductName] in { "Tofu" , "cat"}))

or

Filter Measure = CALCULATE([Tot Sales Measure], FILTER( Products, Products[ProductName] = "Tofu" || Products[ProductName] = "cat"))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

HI Amit,

 

Thanks for your reply

 

would like to conditon for different  table not from same table like product name

 

It should be like below is this possible conditions from 2 different tables ?

 

Filter Measure = CALCULATE([Tot Sales Measure], FILTER( Products, Products[ProductName] = "Tofu" ||Category[Category Name] = "Produce"))

Hi @Varun51 ,

Please try like this:

Filter Measure =
CALCULATE (
    [Tot Sales Measure],
    FILTER (
        Products,
        Products[ProductName] = "Tofu"
            || MAX ( Category[Category Name] ) = "Produce"
    )
)

 

Best Regards,

Xue Ding

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

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

Thats grate working like a Charm !!.

 

May i know why we need to use Max here can you please help me in understanding?

 

Thanks,

Varun

Helpful resources

Announcements
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.