Forum Discussion
Filter data based on unique value contained within column
- 6 years ago
Anonymous you can add a measure and then filter on this measure where measure value <> 0
Filter Dimension = VAR __selectedValue = SELECTEDVALUE ( Slicer[Slicer] ) RETURN CALCULATE ( COUNTROWS ( 'Table' ), CONTAINSSTRING ( 'Table'[Dimension A], __selectedValue ) )Would appreciate Kudos 🙂 if my solution helped.
Hi parry2k ,
The measure seems to give each row the same value (the number of rows in the entire data set).
When I use the dimension in Table B (Slicer[Slicer]), the result is no rows remain (due to the above calculation).
Results on a smaller sample of the data. This is before selecting anything in the filter. Filter selection results in blank table as described above.
Seems like the containsstring function is not being evaulated at each row, but I am not too familiar with this function to understand a workaround.
Picture didn't upload the first time for some reason.
- parry2k6 years ago
Super User
Anonymous first and foremost this slicer table doesn't have any relationship, and ofcourse when no item is selected then you will get all the rows to count but when an item is selected, you should be only getting value where the selected item exists.
- Anonymous6 years agoNot applicable
parry2k Understood. However, when something is selecetd, the table returns blank (even if I am not filtering the table by the measure).
- parry2k6 years ago
Super User
it means values in the slicers table doesn't exist in the column you are checking. can you make sure slicer table has same values