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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Multi Column Filter using DAX or Edit Query

Hi,

 

We can filter multi column using visual level filter in Matrix in power bi.

1.JPG

 

I tried to filter multiple column by using IF functionin DAX and Edit Query. But getting different value.

 

comp vol2 = IF('Table1'[comp status]="pass",1,IF('Table1'[comp status]="fail",1,IF('Table1'[Work Cat]="uw",1,0)))

 

2.JPG

Please find attached .pbix file and let me know is possible to filter multiple column using IF function or any other function or formula.

 

 

 

 

 

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

 

Regards,

Salem

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I hope you realise the reason why you are getting 28 in the first visual, is because you did not put the filter condition of comp status = "pass" AND "fail".  Do you want this condition ? If no, simply delete it from the formula.

 

No comp status condition present in the filters sectionNo comp status condition present in the filters sectionAfter putting the comp status filter conditionAfter putting the comp status filter condition

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

I think you are trying to count all compvol entries in the table which have comp status as "pass" or "fail" and work cat as "uw". You can try the below.

CompVol2Measure =
CALCULATE (
    COUNTROWS ( Table1 ),
    FILTER (
        Table1,
        Table1[comp status] IN { "pass", "fail" }
            && Table1[Work Cat] = "uw"
    )
)
Anonymous
Not applicable

Hi Nikhil,

 

Thanks for your reply.

 

I have created the measure and found half of expected matrix.

 

3.JPG

 

Please have a look is it possible to make the value 28 instead of 14.

 

Regards,

Salem

Anonymous
Not applicable

I hope you realise the reason why you are getting 28 in the first visual, is because you did not put the filter condition of comp status = "pass" AND "fail".  Do you want this condition ? If no, simply delete it from the formula.

 

No comp status condition present in the filters sectionNo comp status condition present in the filters sectionAfter putting the comp status filter conditionAfter putting the comp status filter condition

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.