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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.