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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
adavid999
Helper V
Helper V

add And to if statement

Hello,

Please can anyone let me know how to add another argument to this measure where I want dim_table2[y] to also be filtered? So my aim is to return 1 if dim_table1[x] and dim_table2[y] is filtered, rather than just dim_table1[x] as it is at the moment?

 

Thanks,

A

 

filter measure =
CALCULATE (
IF (
ISFILTERED ( dim_table1[x] ),
1,
0
),
ALLSELECTED ( dim_table3[z] )
)
1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Here you go

 

filter measure =
CALCULATE (
IF (
ISFILTERED ( dim_table1[x] ) && ISFILTERED( dim_table1[y] ),
1,
0
),
ALLSELECTED ( dim_table3[z] )
)
 
Pat




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

1 REPLY 1
mahoneypat
Microsoft Employee
Microsoft Employee

Here you go

 

filter measure =
CALCULATE (
IF (
ISFILTERED ( dim_table1[x] ) && ISFILTERED( dim_table1[y] ),
1,
0
),
ALLSELECTED ( dim_table3[z] )
)
 
Pat




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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