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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 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.

October NL Carousel

Fabric Community Update - October 2024

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