Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
arun3039
Frequent Visitor

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_idProduct NameCategory
1aMobile
2bCharger
3cMobile
4dMobile
5eCharger
6fHeadset
7gCharger
8hheadset
9iMobile
10jCharger

I want to display whose category is Headset & Mobile

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi @arun3039,

 

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

vcazhengmsft_0-1661237637692.png

 

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

View solution in original post

3 REPLIES 3
v-cazheng-msft
Community Support
Community Support

Hi @arun3039,

 

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

vcazhengmsft_0-1661237637692.png

 

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

arun3039
Frequent Visitor

Thanks Amitchandak, Its displaying count with category, but i want to display filter rows on that table Chart.

amitchandak
Super User
Super User

@arun3039 , Create a measure and use that with product and product if in visual

 

calculate(countrows(Table), filter(Table, Table[Category] in{"Headset","Mobile"}))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.