Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hola
Tengo un conjunto de datos de más de 1M líneas de datos. A continuación se muestra una muestra de este conjunto de datos. La columna ID es un campo de texto y el ID aparece varias veces porque están activos en varias fechas de medición. La fecha de medición no es única, porque varios ID pueden tener la misma fecha de medición. La última columna contiene la temperatura medida en la fecha/hora específica.
Id | MeasurementDate | Temperatura |
63473G8615080341001231 | 15-1-2019 10:50 | 20,6 |
63473G8615080341001231 | 15-1-2019 11:00 | 20,6 |
63473G8615080341001231 | 15-1-2019 11:10 | 20,6 |
63473G8615080341001231 | 15-1-2019 11:20 | 20,6 |
63473G8615080341001231 | 15-1-2019 11:30 | 20,6 |
63473G8615080341001231 | 15-1-2019 11:40 | 20,6 |
63473G8615080341001231 | 15-1-2019 11:50 | 20,6 |
63473G8615080341001231 | 15-1-2019 12:00 | 20,6 |
63473G8615080341001231 | 15-1-2019 12:10 | 20,6 |
63473G8615080341001231 | 15-1-2019 12:20 | 20,5 |
63473G8615080341001232 | 15-1-2019 10:50 | 20,8 |
63473G8615080341001232 | 15-1-2019 11:00 | 20,8 |
63473G8615080341001232 | 15-1-2019 11:10 | 20,8 |
63473G8615080341001232 | 15-1-2019 11:20 | 20,8 |
63473G8615080341001232 | 15-1-2019 11:30 | 20,8 |
63473G8615080341001232 | 15-1-2019 11:40 | 20,8 |
63473G8615080341001232 | 15-1-2019 11:50 | 20,8 |
63473G8615080341001232 | 15-1-2019 12:00 | 20,8 |
63473G8615080341001232 | 15-1-2019 12:10 | 20,8 |
63473G8615080341001232 | 15-1-2019 12:20 | 20,9 |
63473G8615080341001233 | 15-1-2019 10:50 | 20,9 |
63473G8615080341001233 | 15-1-2019 11:00 | 20,9 |
63473G8615080341001233 | 15-1-2019 11:10 | 20,9 |
63473G8615080341001233 | 15-1-2019 11:20 | 20,9 |
63473G8615080341001233 | 15-1-2019 11:30 | 20,9 |
63473G8615080341001233 | 15-1-2019 11:40 | 20,9 |
63473G8615080341001233 | 15-1-2019 11:50 | 20,9 |
63473G8615080341001233 | 15-1-2019 12:00 | 20,9 |
63473G8615080341001233 | 15-1-2019 12:10 | 20,9 |
63473G8615080341001233 | 15-1-2019 12:20 | 20,8 |
Quiero crear una nueva columna que solo muestre la última temperatura medida por el ID. Estas son las temperaturas audaces en mi ejemplo. ¿Puede aconsejar qué fórmula puedo usar para organizar esto?
Solved! Go to Solution.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hola @Mark88 ,
Puede crear una medida como se muestra a continuación para obtener la última temperatura:
Latest temperature =
CALCULATE (
MAX ( 'Measurement'[Temperature] ),
FILTER (
'Measurement',
'Measurement'[ID] = MAX ( 'Measurement'[ID] )
&& 'Measurement'[MeasurementDate] = MAX ( 'Measurement'[MeasurementDate] )
)
)
Saludos
Rena
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@AllisonKennedy La tabla real que tengo contiene más columnas. Requiero esta medida en una columna separada (en la misma tabla) porque forma parte de un par de mediciones que necesito implementar en esta tabla para preparar mis datos. La mayoría de las otras mediciones ya me enteré, pero esta no puedo resolver.
Así que para obtener mi resultado final, necesito esta medición en una nueva columna en la misma tabla. Ya intenté trabajar con la función EARLIER, pero no puedo hacer que funcione.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@AllisonKennedy ¡Muchas gracias por tu ayuda! La fórmula RANKX me ayudó a resolver el problema. La fórmula MINX también funcionó, pero esto me mostró la última temperatura en cada celda de la columna. Sólo necesitaba la última temperatura y las otras celdas en blanco. Lo resolví a través de una fórmula IF.
También gracias a @yingyinr y @amitchandak para su tiempo!
@Mark88 , Esto debería funcionar como una medida junto con ID
lastnonblankvalue(Table[MeasurementDate],Table[Temperature])
nueva tabla
Resumir(Tabla,Tabla[ID], "Último Valor",lastnonblankvalue(Table[MeasurementDate],Table[Temperatura]))
Nueva medida ( New Measure)
Sumx(Summarize(Table,Table[ID], "Last Value",lastnonblankvalue(Table[MeasurementDate],Table[Temperature])),[Last Value])
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.