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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
koorosh
Post Partisan
Post Partisan

DAX to filter multiple values in one column

Hello Experts,
Why the following dax does not filter multiple choice in one column like "AND" operator in "IF" function?

 

Table = SUMMARIZECOLUMNS('Sheet1'[User],'Sheet1'[company],'Sheet1'[Certification],
filter('Sheet1',[Certification] in {"Cert A"} && [Certification] in {"Cert B"})
)

 

https://docs.google.com/spreadsheets/d/1Z30vfCPh6RN_Vxx7f2qtCgJQw2xjqSqM/edit?usp=sharing&ouid=11435...

 

What is an easy solution?

 

1 ACCEPTED SOLUTION
koorosh
Post Partisan
Post Partisan

5 REPLIES 5
koorosh
Post Partisan
Post Partisan

PaulDBrown
Community Champion
Community Champion

Try:

A & B =

VAR A = CALCULATATBLE(VALUES(Sheet1[User]), Sheet1[Certification] = "Cert A")

VAR B = CALCULATATBLE(VALUES(Sheet1[User]), Sheet1[Certification] = "Cert B") 

RETURN

COUNTROWS(INTERSECT(A , B))

use the measure in a visual as a filter in the filter pane an set the value to 1





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






How we can have company and date columns in Intersect table?

https://drive.google.com/file/d/1ibg2jv4ecPffXCJCqCQz4J6EjLIKxh6t/view?usp=sharing

 

PaulDBrown
Community Champion
Community Champion

Try:

Table = SUMMARIZE(filter('Sheet1', Sheet1[Certification] in {"Cert A"} && Sheet1[Certification] in {"Cert B"}), 'Sheet1'[User],'Sheet1'[company],'Sheet1'[Certification])
)

 

Though I'm not sure if that is what you are after. The && in the filter means the values should be Cert A and Cert B, as opposed to Cert A or Cert B

If it's OR you are after, try:

Table = SUMMARIZE(filter('Sheet1', Sheet1[Certification] in {"Cert A", "Cert B"}), 'Sheet1'[User],'Sheet1'[company],'Sheet1'[Certification])
)

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






I got nothing.

koorosh_0-1648096219931.png

As you guessed I am looking for AND combination. User Name1 has Cert A and Cert B in the certification column. So I am looking for the DAX function that returns User Name 1 in its result.

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.