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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Chris2016
Resolver I
Resolver I

Selectedvalue with AND condition

Hello,

I am trying to create a dynamic filter using the Selectedvalue function, but I'm not able to add multiple conditions, for example:


_Goals = IF(SELECTEDVALUE(Table[Org])="X", 100,
IF(SELECTEDVALUE(Table[Org]) = "Y", 95,
IF(SELECTEDVALUE(Table[Org])="Z", 90,
80)))

What I would like to add is another condition for the selectedvalue, such as:

_Goals = IF(SELECTEDVALUE(Table[Org])="X" && Table[Category]="a", 100,
IF(SELECTEDVALUE(Table[Org]) = "Y" && Table[Category]="b", 95,
IF(SELECTEDVALUE(Table[Org])="Z" && Table[Category]="c", 90,
80)))


Is there any way to do that?

Many thanks!

1 ACCEPTED SOLUTION
Selva-Salimi
Super User
Super User

Hi @Chris2016 

 

would you update your code as follows:

 

_Goals = IF(SELECTEDVALUE(Table[Org])="X" && selectedvalue(Table[Category])="a", 100,
IF(SELECTEDVALUE(Table[Org]) = "Y" && selectedvalue(Table[Category])="b", 95,
IF(SELECTEDVALUE(Table[Org])="Z" && selectedvalue(Table[Category])="c", 90,
80)))

 

if not? please share more details of the error.

 

If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
Selva-Salimi
Super User
Super User

Hi @Chris2016 

 

would you update your code as follows:

 

_Goals = IF(SELECTEDVALUE(Table[Org])="X" && selectedvalue(Table[Category])="a", 100,
IF(SELECTEDVALUE(Table[Org]) = "Y" && selectedvalue(Table[Category])="b", 95,
IF(SELECTEDVALUE(Table[Org])="Z" && selectedvalue(Table[Category])="c", 90,
80)))

 

if not? please share more details of the error.

 

If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution to help the other members find it more quickly. 

Thank you, my bad, your formula was the exact one I was using and there was no error message, but the output was off due to an issue I was able to figure out in the meantime.
Best regards!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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