Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

calcular un % del total de artículos

Estoy tratando de calcular un % de los elementos que se completaron dentro de una fecha objetivo determinada, siendo este el SLA.

Los datos tienen un número de columnas, pero las que necesito para mis cálculos son:

Artículo #

Terminación

Fecha

Fecha objetivoSla
115/08/202020/08/2020Conocido
217/08/202015/08/2020Not Met
320/08/202020/08/2020Conocido
423/08/202020/08/2020Not Met
501/09/202001/09/2020Conocido

De la muestra anterior, quiero obtener es el % de los elementos que han cumplido con el SLA - 60% (3 de 5).

Estoy creando una nueva medida para que pueda mostrar el resultado usando un VISUAL (Tarjeta).

He comprobado publicaciones similares en el foro, pero todos ellos están utilizando SUM para llegar primero al total y luego dividir el resultado. Esto no parece funcionar para mí, ya que no quiero la SUMA de la columna SLA, sino un COUNT.

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@neeradhi , Pruebe una medida como

Divide(countx(Table, if([Completion date] <-[Target Date], [Item ?], blank())),count(Table[Item ?]))
Divide(countx(Table, if([SLA] á "Met", [Item ?], blank())),count(Table[Item ?]))

Donde columna

SLA si( [Fecha de finalización] <-[Fecha de destino], "Met", "No cumplir")

View solution in original post

Hola @neeradhi ,

Por favor, vea el GIF. Hay dos maneras que pueden cambiarlo al formato de porcentaje.

4.gif

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

11 REPLIES 11
ryan_mayu
Super User
Super User

@neeradhi

tal vez se puede tratar de

Measure = 
VAR TBL=ADDCOLUMNS('table',"ifmet",if('table'[Target Date]>='table'[Completion date],"met","not met"))
return CALCULATE(COUNTROWS('table'),FILTER(TBL,[ifmet]="met"))/COUNTROWS('table')

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




amitchandak
Super User
Super User

@neeradhi , Pruebe una medida como

Divide(countx(Table, if([Completion date] <-[Target Date], [Item ?], blank())),count(Table[Item ?]))
Divide(countx(Table, if([SLA] á "Met", [Item ?], blank())),count(Table[Item ?]))

Donde columna

SLA si( [Fecha de finalización] <-[Fecha de destino], "Met", "No cumplir")

Anonymous
Not applicable

HI @amitchandak ,

Gracias por su solución, está funcionando y estoy recibiendo los resultados correctos ahora. Anteriormente, mi SLA de columna calculado en mi tabla de datos original hacía referencia a una columna incorrecta.

Por lo tanto, he modificado mi respuesta.

¿Puede, por favor, hágamelo saber cómo debo mostrarlo como un % en lugar de un número. Así es como aparece actualmente cuando utilizo la tarjeta de datos visual

neeradhi_0-1599454484614.png

Ashish_Mathur
Super User
Super User

Hola

Este meaure funcionará

=CALCULATE(COUNTROWS(Data),FILTER(Data,Data[Completion date]<-Data[Target Date]))/COUNTROWS(Data)

Espero que esto ayude.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hola @Ashish_Mathur,

Probé la solución, sin embargo, obtuve 1 como resultado.

neeradhi_0-1599393142956.png

Esto es lo que aparece en el VISUAL:

neeradhi_1-1599393192023.png

Hola

Comparte el enlace desde donde puedo descargar tu archivo PBI y mostrar claramente la página/visual donde quieres el resultado como 60%.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hola @Ashish_Mathur ,

Gracias por su respuesta. 😊

Tengo los resultados correctos utilizando la solución proporcionada por Amit.

Rgds,

Neeradhi

Hola @neeradhi ,

Puede establecer el formato de porcentaje en las herramientas Medir.

Haga clic en la medida > elija % > cambiar posiciones decimales

v-xuding-msft_0-1599616826792.png

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hola @v-xuding-msft ,

No obtengo esta opción, cuando hago clic en mi medida

Hola @neeradhi ,

Por favor, vea el GIF. Hay dos maneras que pueden cambiarlo al formato de porcentaje.

4.gif

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-xuding-msft ,

Genial la segunda opción funcionó 👍

Muchas gracias 😀

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.