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

Measure to count rows based on if values are >= x in a column.

I have a table with a column called 'Active', containing values anywhere between 0 and say 20.

 

I would like to create a card in my dashboard that shows how many rows have a value of 10 or greater in the 'Active' column. I am trying to create a measure for this so I can then populate the measure on a card, but nothing I am trying seems to work.

 

I have tried

Over 10 Days = COUNTROWS('All_apps'[Active] >9)

 

and 

 

Over 10 Days = CALCULATE(COUNTROWS('All_apps'),('All_apps'[Active] > 9))
 
But neither of these are working. I know there must be a simple solution but I cannot work out what it is!

 

2 ACCEPTED SOLUTIONS

Try to change the data type of your column to number

View solution in original post

Make sure, that the Active column is of type "Number". Then it will work. 

View solution in original post

9 REPLIES 9
edjeff82
New Member

Thanks everybody for your help and suggestion. Still a bit of a noob with PowerBI and had not noticed the data type for my column was not Number!

Anonymous
Not applicable

Hi, @edjeff82 

It looks like you have found a solution. Could you please mark this helpful post as “Answered”?

This will help others in the community to easily find a solution if they are experiencing the same problem as you.

Thank you for your cooperation!

 

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

MattiaFratello
Super User
Super User

Please try the following
Over 10 Days = CALCULATE(COUNTROWS('All_apps'), 'All_apps'[Active] >= 10)

Thanks, unfortunately when I try this I get the following error;

 

MdxScript(Model) (42, 66) Calculation error in measure 'All_apps'[Over 10 Days]: DAX comparison operations do not support comparing values of type TEXT with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.

Hi,

In the Query Editor, change the data type to number.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Try to change the data type of your column to number

zenisekd
Super User
Super User

Hi @edjeff82 ,

How about: Over 
10 Days = CALCULATE(COUNTROWS('All_apps'),FILTER('All_apps','All_apps'[Active] > 9))

Make sure, that the Active column is of type "Number". Then it will work. 

Thanks, unfortunately when I try this I get the following error;

 

MdxScript(Model) (42,83) Calculation error in measure 'All_apps'[Over 10 Days]: DAX comparison operations do not support comparing values of type TEXT with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.

Make sure, that the Active column is of type "Number". Then it will work. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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