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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
acerNZ
Helper III
Helper III

Filter Multiple Columns for multiple filter options to create a Measure

CombineMeasure = CALCULATE(COUNT(Table[COL1]),FILTER(Table,(Table[Col1]="Completed"))) -- > Works (For one column)

but I need to filter and combine with 3 other options of 2 other columns

Please may I know how ?

 

But I have Col1 - > 2 filters AND (Table[COL1] ="Yes", Table[COL1] ="Not Sure")

Col2 -> AND(Table[Col2]="Yes", Table[Col2]<>"Not Sure", Table[Col2]="Parked")

Col3 -> AND(Table[Col3]="No", Table[Col3]<>"No Order ", Table[Col3]="New York")

 

Please may I know how to combine all above to create a measure to be used.

 

Thanks a ton

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@acerNZ ,

Two tbale values can not be and , they need Or or IN

 

example 

 

CombineMeasure = CALCULATE(COUNT(Table[COL1]),FILTER(Table,(Table[Col1] in {"Yes", "Not Sure"})))

 

CombineMeasure = CALCULATE(COUNT(Table[COL1]),FILTER(Table,(Table[Col1] in {"Yes", "Not Sure"})))

 

1 or 2

CombineMeasure = CALCULATE(COUNT(Table[COL1]),FILTER(Table,(Table[Col1] in {"Yes", "Not Sure"}) || (Table[Col2]="Yes" || Table[Col2]<>"Not Sure" || Table[Col2]="Parked") ))

 

1 and 2

 

CombineMeasure = CALCULATE(COUNT(Table[COL1]),FILTER(Table,(Table[Col1] in {"Yes", "Not Sure"}) &&  (Table[Col2]="Yes" || Table[Col2]<>"Not Sure" || Table[Col2]="Parked") ))

 

add in this way

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@acerNZ ,

Two tbale values can not be and , they need Or or IN

 

example 

 

CombineMeasure = CALCULATE(COUNT(Table[COL1]),FILTER(Table,(Table[Col1] in {"Yes", "Not Sure"})))

 

CombineMeasure = CALCULATE(COUNT(Table[COL1]),FILTER(Table,(Table[Col1] in {"Yes", "Not Sure"})))

 

1 or 2

CombineMeasure = CALCULATE(COUNT(Table[COL1]),FILTER(Table,(Table[Col1] in {"Yes", "Not Sure"}) || (Table[Col2]="Yes" || Table[Col2]<>"Not Sure" || Table[Col2]="Parked") ))

 

1 and 2

 

CombineMeasure = CALCULATE(COUNT(Table[COL1]),FILTER(Table,(Table[Col1] in {"Yes", "Not Sure"}) &&  (Table[Col2]="Yes" || Table[Col2]<>"Not Sure" || Table[Col2]="Parked") ))

 

add in this way

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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