Forum Discussion
Create a filter in a parameter selection
- Anonymous2 years ago
Hi rk1904 ,
Please try below steps:
1. below is my test table
Table:
2. add a field parameter with slicer
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 _a4. add a Table visual with field and add measure to the table visual filter pane and configure
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.
Hi rk1904 ,
Please try below steps:
1. below is my test table
Table:
2. add a field parameter with slicer
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
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.