Forum Discussion
Filter Buttons
- 5 years ago
StuartSmith To use the filter, you need to create a measure that connects it to your data, so for example:
SuggestedFilter = IF( CONTAINSSTRING( Table[Comments], SELECTEDVALUE(Slicer[SlicerColumn])) , 1, 0)
Then add this slicer to your table visual (and search box too if you want) and set to filter for only = 1 .
Note, this will only work for single selections in the chiclet. You may need more advanced DAX if it must work for multi-select.
- 5 years ago
Think i figured it out...
TEST_Key_Search_Word_Filter_Measure =VAR Key_Word = SELECTEDVALUE('Key Words'[Value])RETURN IF(CONTAINSSTRING(SELECTEDVALUE('Carrier Matrix'[OData__2_Contractcomments]),Key_Word),1,0)Does that look right?
StuartSmith Bookmarks 'data' tick box will enable all filters to be saved if ticked, or do nothing with filters if unticked. So if you untick data then you won't be able to apply any filters.
I think the best option is to create a table with the list of words you want users to be able to select. Put that in a slicer (format as horizontal or use chiclet slicer to make them buttons). Then use CONTAINSSTRING to create a measure that filters the table visual when user selects one of those values. Does that make sense?
Thanks, I had got as far as getting the "SELECTEDVALUE" displaying in a card and was then going to figure out where to go from there.
I have tried your suggestion, but the "CONTAINSSTRING" parameter only displays existing measures and if I enter the table/column manually, I get the red squiggly error line. Any ideas why?
- StuartSmith5 years agoPower Participant
Think i figured it out...
TEST_Key_Search_Word_Filter_Measure =VAR Key_Word = SELECTEDVALUE('Key Words'[Value])RETURN IF(CONTAINSSTRING(SELECTEDVALUE('Carrier Matrix'[OData__2_Contractcomments]),Key_Word),1,0)Does that look right?