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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
njxfoster
Helper I
Helper I

How to If text column CONTAINS specified value, Then Count it

Hi Everyone,

 

I'm trying to create a calculated measure in one of my tables that help me count every column that contains the word "Warm".

 

How can I implement CALCULATE(COUNTROWS to achieve this function? 

 

 

Thank you

1 ACCEPTED SOLUTION

Hi @njxfoster 

 

Try this measure:

Measure =
CALCULATE (
    COUNTROWS ( 'Table' ),
    FILTER ( 'Table', CONTAINSSTRING ( 'Table'[Connection Details], "Warm" ) )
)

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

View solution in original post

3 REPLIES 3
ValtteriN
Community Champion
Community Champion

Hi,

Here is one way to do this:

CountWarm = COUNTROWS(
FILTER(
ADDCOLUMNS(Temperature,"Test",
if(SEARCH("Warm",Temperature[Temperature],,2)<>2,1,0)),[Test]=1))


End result:
ValtteriN_0-1642623635705.png

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!







Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi ValtteriN! Thank you for your answer

 

The table is for phone transfer detail, There is a column about "Connection Details". I need to see how many phone connection is being " Warm transfered"  So I was thinking to count columns that contain the word "Warm" .

 

is there any way to count this without creating new column?

 

Thanks in advance

Hi @njxfoster 

 

Try this measure:

Measure =
CALCULATE (
    COUNTROWS ( 'Table' ),
    FILTER ( 'Table', CONTAINSSTRING ( 'Table'[Connection Details], "Warm" ) )
)

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.