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

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

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
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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.