Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |