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
gctaeger
New Member

Counting rows by searching text in one column and value in another column of a table

Hello

I have a table one column has Comments (free text) and another column has a value. I'm trying to count the rows that contain the "Warranty" in any part of the text in Comments column and in the Totals column the value 0

 

eg

[Comments]                                                       [ Total]

Checked engine                                                $500

Service may have warranty                               $100

Warranty repair                                                 $0

 

Im looking for a solution of 1 which is the 3rd row as it has the word warranty and the value 0

 

Thanks in advance

2 REPLIES 2
gctaeger
New Member

Hello - thanks for your response but the dax formula summed the value i.e. I got a result of $481.80 which was the value of 1 invoice which had the term warranty in the [comments] - I did a manual check and there were 3 invices with the term warranty 2 had values and 1 had $0.00. the solution should give a result of 1 i.e. 1 row which has $0.00 value and the term warranty

I'm new to DAX

Thanks once again very much appreciated

amitchandak
Super User
Super User

@gctaeger , based on what I got. Try a measure like

calculate(sum(table[total]), filter(Table, search("warranty",[Comments],,0)>0))

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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