Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hola amigos,
agradecería infinitamente su ayuda. Tengo el siguiente problema y no encuentro el cálculo. Tengo la siguiente tabla y necesito saber el % del tiempo que una casa está entre 17 y 24 (temperatura) y 40 y 60 (humedad), cuando se cumple esa condición se puede decir que la casa está dentro del rango de confort.
He creado las medidas siguientes
Solved! Go to Solution.
Hi @sunnypb ,
Please try:
Percentage =
VAR _a =
ADDCOLUMNS (
'Table',
"Comfort",
IF (
( 'Table'[TIPO SONDA] = "TEMPERATURA"
&& [LECTURA] <= 25
&& [LECTURA] >= 17 )
|| ( 'Table'[TIPO SONDA] = "HUMEDAD"
&& [LECTURA] <= 60
&& [LECTURA] >= 40 ),
"Comfortable",
"Uncomfortable"
)
)
RETURN
DIVIDE (
COUNTROWS ( FILTER ( _a, [Comfort] = "Comfortable" ) ),
COUNTROWS ( 'Table' )
)
Output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @sunnypb ,
Please try:
Percentage =
VAR _a =
ADDCOLUMNS (
'Table',
"Comfort",
IF (
( 'Table'[TIPO SONDA] = "TEMPERATURA"
&& [LECTURA] <= 25
&& [LECTURA] >= 17 )
|| ( 'Table'[TIPO SONDA] = "HUMEDAD"
&& [LECTURA] <= 60
&& [LECTURA] >= 40 ),
"Comfortable",
"Uncomfortable"
)
)
RETURN
DIVIDE (
COUNTROWS ( FILTER ( _a, [Comfort] = "Comfortable" ) ),
COUNTROWS ( 'Table' )
)
Output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.