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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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