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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
kyrpav
Helper V
Helper V

COUNTIF in columns

I would like to do a Countif(RANGE;criteria)

 

where the range is one row but different columns. Columns also are not one next to the other. and the creteria is some text like:

 

COUNTIF(A3:K3;"R")

 

In this case excel would have skip all columns that could be numbers etc.

 

Is this possible with DAXs so i can create a new column in the table with a function to calculate each row?

 

1 ACCEPTED SOLUTION

Solved the problem with nested ifs so i could get for each column one value based on text. This was set to a variable.

 

Also each column was calculated in a variable and then i just sum all variables

View solution in original post

5 REPLIES 5
Icey
Community Support
Community Support

Hi @kyrpav ,

 

Is this problem solved?

 

 

Best Regards,

Icey

Solved the problem with nested ifs so i could get for each column one value based on text. This was set to a variable.

 

Also each column was calculated in a variable and then i just sum all variables

Icey
Community Support
Community Support

Hi @kyrpav ,

 

Please refer to this post: Counting Text Values in Multiple Columns.

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

camargos88
Community Champion
Community Champion

Hi @kyrpav ,

 

Have you thought about COUNTX function ?

 

Ricardo



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

Proud to be a Super User!



i do not think it is this. If you have a table :

 

col1col2col3col4
RGBR

 

What i want is to by a function that passes all columns to count. 

So by CountIF(A2:D2;"R") = 2

and like this then i can count for each case seperately and sum up.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors