Forum Discussion

AksPRAKSH's avatar
AksPRAKSH
New Member
1 year ago
Solved

Power BI Filter a Table Visual

Hello everyone,

 

Hope you are doing good.

 

I need help with filtering on a table visual. 

 

The sample data would be like this-

Order No.Condition1Condition2Condition3Customer No.AmountLocation
1231AXA11000Houston
2340AYA11000Houston
3451BZA23000California
4560CZA22000California

 

I need multiple filters which filter the table visual based on multiple conditions.

For eg- 

Filter1 should return the Order No. with Condition1=1 AND Condition2=A AND Condition3=X. 

Filter2 returns the Order No. with Condition1=0 AND Condition2=A AND Condition3=X. 

Filter3 returns orders with the Order No. with Condition3=Z. 

 

Similarly I need 10 filters that would filter a table visual with order details like-

Order No.Customer No. AmountLocation
123A11000Houston
234A11000Houston
456A22000California

 

 

When I select Filter1, the table should show only order details for Order No.=123.

When I select Filter2, the table shows no values.

When I select Filter3, the table should show orders with Order No. =345,456

When I select Filter1 and Filter3, the table shows orders with Order No. = 123,345,456

 

What would be the best approach to solve this? 

 

Thanks in advance

 

Akshay

  • AksPRAKSH 

    you can create a column 

    Column =
    switch(TRUE(),'Table'[Condition1]=1 && 'Table'[Condition2]="A" && 'Table'[Condition3]="X","filter1",'Table'[Condition1]=0&&'Table'[Condition2]="A" &&'Table'[Condition3]="X","filter2",'Table'[Condition3]="Z", "filter3")
     
    and create a filter table for selection.
     
    pls see the attachment below
     
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi AksPRAKSH 

     

    Thanks to ryan_mayu for the quick reply!

    In addition to ryan_mayu's method, you can also create hierarchical slicers that put multiple filter criteria into one slicer.

    Right-click on “Condition1” and select “Create hierarchy”, then add “Condition2” and “Condition3” to this hierarchy.

    Create a slicer with the hierarchy and use “CTRL” + click for multi-criteria filtering.

     

    Best Regards,
    Jarvis Tang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi AksPRAKSH 

     

    Thanks to ryan_mayu for the quick reply!

    In addition to ryan_mayu's method, you can also create hierarchical slicers that put multiple filter criteria into one slicer.

    Right-click on “Condition1” and select “Create hierarchy”, then add “Condition2” and “Condition3” to this hierarchy.

    Create a slicer with the hierarchy and use “CTRL” + click for multi-criteria filtering.

     

    Best Regards,
    Jarvis Tang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • AksPRAKSH 

    you can create a column 

    Column =
    switch(TRUE(),'Table'[Condition1]=1 && 'Table'[Condition2]="A" && 'Table'[Condition3]="X","filter1",'Table'[Condition1]=0&&'Table'[Condition2]="A" &&'Table'[Condition3]="X","filter2",'Table'[Condition3]="Z", "filter3")
     
    and create a filter table for selection.
     
    pls see the attachment below