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
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
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.