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
tanveer4m
Regular Visitor

Greater than, less than and equal to a single column values

Hi Everyone,

 

I am trying to calculate how many values are greater than 12 and lessser than 12 and equals to 12 from a single column.

Table is having numbers ranging from 1 to 40 on a single column.

 

I have seen the dmax formula as creating filters less than and greater than these two works perfectly but when I apply third catagory that is equals to 12. Formula error occurs and says this is reoccurring to previous filters. I am stuch with this.

 

I can easily archive the above in excel by applying countif, since this is not available in power bi I am struggling how to achieve this.

 

Could anyone please help me out.

 

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @tanveer4m 

you would need multiple measures like:

 
Above12 =
COUNTROWS(FILTER(ALL(TableName), TableName[Value]>12)
Equal12 =
COUNTROWS(FILTER(ALL(TableName), TableName[Value]=12)
Below12 =
COUNTROWS(FILTER(ALL(TableName), TableName[Value]<12)

View solution in original post

3 REPLIES 3
tanveer4m
Regular Visitor

The chart which is prepared by applying the above dmax code, is static and does not interact with other charts present in the dashboard.Dashboard.png

FreemanZ
Super User
Super User

hi @tanveer4m 

you would need multiple measures like:

 
Above12 =
COUNTROWS(FILTER(ALL(TableName), TableName[Value]>12)
Equal12 =
COUNTROWS(FILTER(ALL(TableName), TableName[Value]=12)
Below12 =
COUNTROWS(FILTER(ALL(TableName), TableName[Value]<12)

Thanks @FreemanZ  exactly what i was looking to accomplish

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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