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, 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?
Solved! Go to Solution.
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
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
Covering 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.