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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors