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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Tinus1905
Resolver I
Resolver I

PowerBi filter multiple columns with multiple filters

Hi,

 

Im struggling a little bit with an measure. 

I have the following table. 

ID       Status           Type          Name

123acceptyesyellow
123acceptyes 
456not possiblestandardgreen
456not possiblestandard 
789not possiblestandardgreen
135acceptno 

 

I want to distinctcount the ID column, and then calculate Type column = "Yes" and "No" AND the Status column = "not possible" and the Name column = "Green". 

So the outcome must be: 4

 

ID       Status            Type         Name

123acceptyesyellow
456not possiblestandardgreen
789not possiblestandardgreen
135acceptno 

 

My formula is: 

 

Count =
    CALCULATE(
    DISTINCTCOUNT(tableA[ID]),
    tableA[Type] IN {"yes", "no"},
    tableA[Status] = "not possible" &&
    tableA[Name] = "green")
 
The outcome here is 0, but that is wrong. 
 
How can I solve this. 
2 ACCEPTED SOLUTIONS
Tinus1905
Resolver I
Resolver I

This formula must be it.

 

Count =
CALCULATE(
DISTINCTCOUNT(tableA[ID]),

(tableA[Type] = "yes" || tableA[Type] = "no") ||
(tableA[Status] = "not possible" &&
tableA[Name] = "green"))

 

The only question I have now is, ID 456 is double and with distinctcount I get 1 count. But will it count the row with column "name" and "green" value or the other one. So is distinccount after the filters has been set or is it before the filters. 

View solution in original post

Uzi2019
Super User
Super User

Hi @Tinus1905 
try below measure.

 

Count of id =
CALCULATE(DISTINCTCOUNT('Table'[ID]),AND('Table'[Status]="not possible" , 'Table'[Name]="green") || 'Table'[Type]="yes"|| 'Table'[Type]= "no")
 
Uzi2019_1-1720088309866.png

 

 

I hope I answered your question!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

6 REPLIES 6
Uzi2019
Super User
Super User

Hi @Tinus1905 
try below measure.

 

Count of id =
CALCULATE(DISTINCTCOUNT('Table'[ID]),AND('Table'[Status]="not possible" , 'Table'[Name]="green") || 'Table'[Type]="yes"|| 'Table'[Type]= "no")
 
Uzi2019_1-1720088309866.png

 

 

I hope I answered your question!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Tinus1905
Resolver I
Resolver I

This formula must be it.

 

Count =
CALCULATE(
DISTINCTCOUNT(tableA[ID]),

(tableA[Type] = "yes" || tableA[Type] = "no") ||
(tableA[Status] = "not possible" &&
tableA[Name] = "green"))

 

The only question I have now is, ID 456 is double and with distinctcount I get 1 count. But will it count the row with column "name" and "green" value or the other one. So is distinccount after the filters has been set or is it before the filters. 

Alican_C
Resolver II
Resolver II

just realized that there isnt actually any ID matching with all conditions you looked for. 

highlighted values matching the condition with green.  See below there is no single line meets your all
Type column = "Yes" and "No" AND the Status column = "not possible" and the Name column = "Green". .

ID       Status           Type          Name

123acceptyesyellow
123acceptyes 
456not possiblestandardgreen
456not possiblestandard 
789not possiblestandardgreen
135acceptno 

 

 

Hi @Tinus1905 

try below measure

Count of id =
CALCULATE(DISTINCTCOUNT('Table'[ID]),AND('Table'[Status]="not possible" , 'Table'[Name]="green") || 'Table'[Type]="yes"|| 'Table'[Type]= "no")

Uzi2019_0-1720088232602.png

 

 

I hope  I naswered your question!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Alican_C
Resolver II
Resolver II

Give it a shot with this;

Count =
CALCULATE(
DISTINCTCOUNT(tableA[ID]),
FILTER(
tableA,
(tableA[Type] = "yes" || tableA[Type] = "no") &&
tableA[Status] = "not possible" &&
tableA[Name] = "green"
)
)

Sadly the outcome is still 0. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.