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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors