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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
lmundia
Frequent Visitor

DAX Function - Help

I have a DAX function IF(AND that I am expecting to return a true value but it's returning false and I am not sure what I am doing wrong. When there are multiple selections I am expecting it to return "Multiple Selections" but it's returning the department names rather.

Selection Results = IF(AND(Departments[Department]= "Finance", Departments[Department]= "Human Resources"), "Multiple Selections", Departments[Department])

 IF-AND.PNG

 

Thank you in advance

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

@lmundia Try this Measure...

 

Selection Results = IF ( HASONEVALUE (Departments[Department]), VALUES(Departments[Department]), "Multiple Selections")

 

Show Text Filter VALUES.png

View solution in original post

1 REPLY 1
Sean
Community Champion
Community Champion

@lmundia Try this Measure...

 

Selection Results = IF ( HASONEVALUE (Departments[Department]), VALUES(Departments[Department]), "Multiple Selections")

 

Show Text Filter VALUES.png

Helpful resources

Announcements
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.