Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Good morning all,
My request concerns the programming of a measure. As you can see on the image below :
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:
Do you think it is possible to reproduce the same result in DAX measurement?
I thank you in advance
Have a good day
Solved! Go to Solution.
@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]))
Hi @amitchandak and thank you but the measure is not working. Here is the result I get:
For more information on my file, I attach below the code of the "Sensor value" measurement :
I also attach the architecture of my Dataset to make it more understandable:
Thank you in advance for your help
@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]))
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |