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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
rk1904
New Member

Create a filter in a parameter selection

I have a parameter with column A, column B, column C and I want to make a filter to the table depending on the chosen parameter

 

for example if I choose column A I want > 20, if I choose column B I want > 100, if I choose column C I want < 0.5

 

ID    column A     column B      column C

1          10                110               0.5              

2           5                 250               0.3                      

3           25                 2                 0.7                    

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @rk1904 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1709862376764.png

 

2. add a field parameter with slicer

vbinbinyumsft_1-1709862393338.png

 

3. create a measure with below dax formula

MEASURE =
VAR tmp =
    SELECTCOLUMNS ( Parameter, "PT", [Parameter] )
VAR _str =
    CONCATENATEX ( tmp, [PT] )
VAR _a =
    SWITCH (
        TRUE (),
        COUNTROWS ( tmp ) = 3, 1,
        CONTAINSSTRING ( _str, "Column A" ), IF ( SELECTEDVALUE ( 'Table'[Column A] ) > 20, 1 ),
        CONTAINSSTRING ( _str, "Column B" ), IF ( SELECTEDVALUE ( 'Table'[Column B] ) > 100, 1 ),
        CONTAINSSTRING ( _str, "Column C" ), IF ( SELECTEDVALUE ( 'Table'[Column C] ) < 0.5, 1 )
    )
RETURN
    _a

4. add a Table visual with field and add measure to the table visual filter pane  and configure

Animation03.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @rk1904 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1709862376764.png

 

2. add a field parameter with slicer

vbinbinyumsft_1-1709862393338.png

 

3. create a measure with below dax formula

MEASURE =
VAR tmp =
    SELECTCOLUMNS ( Parameter, "PT", [Parameter] )
VAR _str =
    CONCATENATEX ( tmp, [PT] )
VAR _a =
    SWITCH (
        TRUE (),
        COUNTROWS ( tmp ) = 3, 1,
        CONTAINSSTRING ( _str, "Column A" ), IF ( SELECTEDVALUE ( 'Table'[Column A] ) > 20, 1 ),
        CONTAINSSTRING ( _str, "Column B" ), IF ( SELECTEDVALUE ( 'Table'[Column B] ) > 100, 1 ),
        CONTAINSSTRING ( _str, "Column C" ), IF ( SELECTEDVALUE ( 'Table'[Column C] ) < 0.5, 1 )
    )
RETURN
    _a

4. add a Table visual with field and add measure to the table visual filter pane  and configure

Animation03.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.