Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Tengo una columna con las horas acumuladas por meses. Necesito calcular las horas totales de cada mes, es decir, reiniciar las horas acumuladas hasta ese mes menos las acumuladas hasta el mes anterior. Por ejemplo: Si hasta enero de 2022 son 3806 horas y en febrero son 3846, pues necesito saber como calcular (Horas febrero - Horas enero) = (3846 - 3806 = 40). Gracias.
Tengo una columna con las horas acumuladas por meses. Necesito calcular las horas totales de cada mes, es decir, reiniciar las horas acumuladas hasta ese mes menos las acumuladas hasta el mes anterior. Todo esto mientras que la columna TIPO sea igual a DIESEL. Por ejemplo: Si hasta enero de 2022 son 3806 horas y en febrero son 3846, pues necesito saber como calcular (Horas febrero - Horas enero) = (3846 - 3806 = 40). gracias
Make sure you have a column like YYYYMM of Month end date call it date (as of now).
Then have a new column
New column =
var _max = maxx(filter(Table, Table[Date] < earlier(Table[Date]) ), Table[Date])
return
maxx(filter(Table, Table[Date] =_max ), Table[Value])
@amitchandak ¡Hola! Muchas gracias por tu respuesta pero con este código me aparece solo la primera linea con un 0. New column = var _max = maxx(filter('HORÓMETRO', 'HORÓMETRO'[Fecha] < anterior('HORÓMETRO'[Fecha])) ,'HORÓMETRO'[Fecha]) return MAXX(filtro('HORÓMETRO', 'HORÓMETRO'[Horas] =_max ), 'HORÓMETRO'[Horas])
User | Count |
---|---|
106 | |
86 | |
81 | |
73 | |
72 |
User | Count |
---|---|
112 | |
100 | |
98 | |
72 | |
66 |