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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

COUNTROWS for Language columns except English

Hello, 

 

I have a table with a lot of jobs requiring English speakers and other languages, some of them are combined for example "English, Dutch" or "Dutch, English", etc. 

 

I am looking for a formula that can count all the combined languages or other languages except English. There is a catch, if there is English text in the combined languages (for example English, Dutch), they should be counted also as "other languages". 

 

I know how to count all the English but I believe it counts also the "English, Dutch" combinations, is there a way to fix it to get only where the English language is alone? 

 

English only = CALCULATE(
COUNTROWS(report);
SEARCH("English";report[languages];;0))

 

Thank you very much!

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @Anonymous 

Try including the condition that the length of the string is actually that of "English", so there's nothing more:

  

English only =
CALCULATE (
    COUNTROWS ( report );
    SEARCH ( "English"; report[languages];; 0 )
        && LEN ( Table1[C1] ) = LEN ( "English" )
)

 

Please mark the question solved when done and consider kudoing if posts are helpful.

Cheers  Datanaut

View solution in original post

6 REPLIES 6
AlB
Community Champion
Community Champion

Hi @Anonymous 

Try including the condition that the length of the string is actually that of "English", so there's nothing more:

  

English only =
CALCULATE (
    COUNTROWS ( report );
    SEARCH ( "English"; report[languages];; 0 )
        && LEN ( Table1[C1] ) = LEN ( "English" )
)

 

Please mark the question solved when done and consider kudoing if posts are helpful.

Cheers  Datanaut

Anonymous
Not applicable

Thank you very much @AlB !!!

 

Do you have a formula that can count all rows excluding all the English only rows as well?

 

 

 

 

AlB
Community Champion
Community Champion

@Anonymous 

How about a measure counting all rows and subtracting the English-only ones that we calculated above:

NotEnglishOnly = COUNTROWS(Table1) - [English only]
Anonymous
Not applicable

Thank you @AlB 

 

I tested the formula and it doesn't work (it's my fault, I haven't painted the whole picture) and things seem to be more complicated than I thought. This is what I got with the current formula: 

 

PBIDesktop_2obaB33saS.png

 

Each job has a number of required candidates for each language or combination of languages. Each job has a unique ID. Therefore, the results from Candidates required should appear on my English Only column where that formula applies.

 

Probably COUNTROWS is not suitable here, it probably a calculation rather than a count of rows. Should I open another thread? It seems that I mixed things up. 

 

Maybe I can multiply the results with the number of candidates required? 

AlB
Community Champion
Community Champion

@Anonymous 

The measures provided above are assumed to work under no filter context, i.e. on a visual card. If that's not the case then you need to explain in what context you would use this and provide a sample of your data (in tabular format rather than screen captue so that it can be copied) 

Anonymous
Not applicable

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors