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

Cree una medida para encontrar el rendimiento de la planta en el informe de Power BI

Tengo una columna relacionada con la fabricación "Estado" que tiene los valores "Completado", "Descanso de la máquina", "Mantenimiento", etc., necesito crear una medida que da el % total completado.

Si hay 10 filas y el campo Estado es "Completado" para alrededor de 7 filas, entonces mi medida debe ser 70%.

¿Cómo hacer esto? Por favor, ayuda

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@SabariPrabu , Pruebe nuevas medidas como

Sobre todo el % completado ?
divide(calculate(countrows(Table), Table[Status] á"Completed"), calculate(countrows(Table)))

cuando se ve por estado
Status % - divide(calculate(countrows(Table)), calculate(countrows(Table), all(Table)))

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@SabariPrabu , Pruebe nuevas medidas como

Sobre todo el % completado ?
divide(calculate(countrows(Table), Table[Status] á"Completed"), calculate(countrows(Table)))

cuando se ve por estado
Status % - divide(calculate(countrows(Table)), calculate(countrows(Table), all(Table)))

Greg_Deckler
Super User
Super User

@SabariPrabu Los datos de ejemplo lo harían más fácil. En teoría:

Measure =
  VAR __Machine = MAX([Machine])
  VAR __Completed = COUNTROWS(FILTER(ALL('Table'),[Machine]=__Machine && [Status]="Completed"))
  VAR __All = COUNTROWS(FILTER(ALL('Table'),[Machine]=__Machine))
RETURN
  DIVIDE(__Completed,__All,0)

También puede estar interesado en MTBF - Ver mi artículo sobre el tiempo medio entre el fracaso (MTBF) que utiliza ANTES: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395....
El patrón básico es:
Columna ?
VAR __Current á [Valor]
VAR __PreviousDate á MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])

VAR __Previous á MAXX(FILTER('Table',[Fecha]-__PreviousDate),[Valor])
devolución
__Current - __Previous


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

¿Por qué estamos usando este campo VAR __Machine - MAX([Machine]). ¿Qué contiene este campo?

@SabariPrabu - Eso fue para una medida para averiguar con qué máquina está tratando. ¿Se supone que es una columna?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.