Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to filter text column using Dax

I want to filter and show data according to the category. which should be filtered in my Table chart Product_id Product Name Category 1 a Mobile 2 b Charger 3 c Mobile 4 d M...
  • v-cazheng-msft's avatar
    4 years ago

    Hi Anonymous,

     

    You may try this solution.

    1 Create a measure like this

    FilterTable = CALCULATE(MAX('Table'[Category]),'Table'[Category] IN {"Headset","Mobile"})

     

    2 Add filters on this visual to show items when the value is not blank

     

    In fact, you could simply use Filters pane to achieve it: just tick the category you need to show but leave other catetories unticked.

     

    Attached the pbix file as reference.

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!

     

    Best Regards,    

    Community Support Team _ Caiyun