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
Anonymous
Not applicable

COUNTIFS occurrence sensor values DAX

Good morning all,

My request concerns the programming of a measure. As you can see on the image below : 

image.png

I have a table with 3 columns: DT10 min (Time of reading the value of the sensor); Sensor value (Reading value); number occurrence value (number of occurrence of the value). I would like to be able to program the "number of occurrences value" measurement so that it can give me the number of times the value read has been taken or exceeded. Example on Excel with the "COUNTIFS" function:

image.png
Do you think it is possible to reproduce the same result in DAX measurement?

 

I thank you in advance

 

Have a good day

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try new meaures like

 

value occurrence =countx(filter(allselected(Table), Table[value]>=Table[Value]),Table[Value])


occurrence % = divide(countx(filter(allselected(Table), Table[value]>=Table[Value]),Table[Value]),countx(allselected(Table),Table[Value]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @amitchandak and thank you but the measure is not working. Here is the result I get:

image.png

For more information on my file, I attach below the code of the "Sensor value" measurement :

image.png

I also attach the architecture of my Dataset to make it more understandable:

image.png

Thank you in advance for your help

amitchandak
Super User
Super User

@Anonymous , Try new meaures like

 

value occurrence =countx(filter(allselected(Table), Table[value]>=Table[Value]),Table[Value])


occurrence % = divide(countx(filter(allselected(Table), Table[value]>=Table[Value]),Table[Value]),countx(allselected(Table),Table[Value]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

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.