Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
56 | |
27 | |
24 | |
14 | |
9 |
User | Count |
---|---|
77 | |
61 | |
47 | |
17 | |
12 |