Forum Discussion
DAX Measure to get multiple selected filters values
Hi All,
I have a table with a column 'Countries' with few values. This column is used in the filter pane selection as well. I need to create a measure so that whatever countries are selected in the filter pane, value of '1' should be shown beside the selected Country table as shown in the screenshot below.
Hope this helps:
2 Replies
- Padycosmos
Solution Sage
Hope this helps:
- MAwwad
Solution Sage
You can create a measure that uses the SELECTEDVALUE and CONTAINSROW functions to check whether the selected countries match with the countries in the table, and return a value of 1 if they match. Here's an example measure:
Selected Countries = IF( CONTAINSROW(Table1, Table1[Countries], SELECTEDVALUE(Table1[Countries])), 1, BLANK() )This measure will return a value of 1 for the selected countries in the filter pane, and a blank value for the unselected countries. You can add this measure to a table visual along with the Countries column to see the results.