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
Syndicate_Admin
Administrator
Administrator

Medir para contar los elementos de una tabla con algún filtro

Hola, tengo columnas a continuación en dos tablas diferentes y me gustaría mostrar el recuento de no de máquinas que tiene un valor 0 para la última fecha.

Cuadro 1

Identificación Máquina
1 MachineA
2 MáquinaB
3 MachineC

Cuadro 2


Identificación Valor Timestamp
1 7 2021-09-09
1 4 2021-09-15
1 0 2021-09-21
2 6 2021-09-09

Aquí quiero contar como 1 ya que la última fecha en la marca de tiempo es 2021-09-21 donde una máquina tiene un valor como 0. ¿Cómo puedo crear una medida para esto?

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Aquí hay una medida que puede lograr esto:

MaxCount = 
var l = maxx('Table 2','Table 2'[Timestamp])
var c = CALCULATE(DISTINCTCOUNT('Table 2'[Id]),ALLSELECTED('Table 2'),'Table 2'[Timestamp]=l,'Table 2'[Value]=0)
return c

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Hola

Puede descargar mi archivo PBI desde aquí.

Espero que esto ayude.

Untitled.png

Syndicate_Admin
Administrator
Administrator

Aquí hay una medida que puede lograr esto:

MaxCount = 
var l = maxx('Table 2','Table 2'[Timestamp])
var c = CALCULATE(DISTINCTCOUNT('Table 2'[Id]),ALLSELECTED('Table 2'),'Table 2'[Timestamp]=l,'Table 2'[Value]=0)
return c

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.

Users online (906)