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
Cómo dividir 2 filas en la consulta de energía si ambas columnas contienen en blanco o cero. Aquí están los datos de muestra que necesito para dividir hrs/Total.
Horas | Total |
18.00 | 18.00 |
14.00 | 14.00 |
4.00 | 5.00 |
5.00 | 5.00 |
20.00 | 20.00 |
1.00 | 1.00 |
2.00 | 2.00 |
4.00 | 4.00 |
0.00 | |
3.00 | |
3.00 | 0.00 |
24.00 | 0.00 |
56.00 | 1.00 |
31.00 | 28.00 |
8.00 | 7.00 |
11.00 | 11.00 |
12.00 | 12.00 |
Solved! Go to Solution.
Hola @Sriku ,
Pruebe el siguiente código:
try [Hrs]/[Total] otherwise 0
Si no desea tener infinito en el cálculo, haga lo siguiente
if [Total] = 0 then 0 else try [Hrs]/[Total] otherwise 0
En ambos casos reemplace el 0 por el valor que desea si desea obtener el resultado en blanco reemplace 0 por null
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHola @Sriku ,
Pruebe el siguiente código:
try [Hrs]/[Total] otherwise 0
Si no desea tener infinito en el cálculo, haga lo siguiente
if [Total] = 0 then 0 else try [Hrs]/[Total] otherwise 0
En ambos casos reemplace el 0 por el valor que desea si desea obtener el resultado en blanco reemplace 0 por null
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering 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 |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |