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

Obtenga valor al comienzo del mes y al final del mes para cada activo

Hola, chicos

En un poco de pepinillo aquí, no puedo conseguir mi cabeza alrededor de cómo obtener el valor al principio del mes y al final del mes.

Para la tabla siguiente quiero obtener el valor de Primer KM registrado en un mes para V1 y el último valor de KM. De forma similar para V2 y V3....

¿Cómo agrego un filtro para que Table1[Asset] - V1 (sin especificar un valor fijo de V1 y cambia como la fila cambia como podemos hacer en Excel)

Además, como hay varias fechas en la columna de fecha me da un error.

ActivoFechaKmPrimer valor KM del mesValor del último KM del mes
V11/01/20201200
V12/01/20201300
V23/01/20201400
V34/01/20201500
V25/01/20201600
V76/01/20201700
V67/01/20201800
V108/01/20201900
V19/01/20202000
V210/01/20202100
V311/01/20202200
V112/01/20202300
V129/01/20202400
V214/01/20202500
V315/02/20202600
V216/02/20202700
V717/02/20202800
V618/02/20202900
V1019/02/20203000
V120/02/20203100
V221/02/20203200
V322/02/20203300

Espero algunas respuestas. Avísame si necesita un poco más de cl

Salud.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@New2PBI09 ,

Crear siguiendo como nuevas columnas

start of month = minx(filter(table,[Asset] =earlier([Asset]) && format([Date],"YYYY-MM") =format(earlier([Date]),"YYYY-MM")),[Date])
end of month =maxx(filter(table,[Asset] =earlier([Asset]) && format([Date],"YYYY-MM") =format(earlier([Date]),"YYYY-MM")),[Date])

First KM Value of the Month =minx(filter(table,[Asset] =earlier([Asset]) && format([start of month],"YYYY-MM") =format(earlier([Date]),"YYYY-MM")),[KM])

Last KM Value of the month=maxx(filter(table,[Asset] =earlier([Asset]) && format([Date],"YYYY-MM") =format(earlier([end of month]),"YYYY-MM")),[Date])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@New2PBI09 ,

Crear siguiendo como nuevas columnas

start of month = minx(filter(table,[Asset] =earlier([Asset]) && format([Date],"YYYY-MM") =format(earlier([Date]),"YYYY-MM")),[Date])
end of month =maxx(filter(table,[Asset] =earlier([Asset]) && format([Date],"YYYY-MM") =format(earlier([Date]),"YYYY-MM")),[Date])

First KM Value of the Month =minx(filter(table,[Asset] =earlier([Asset]) && format([start of month],"YYYY-MM") =format(earlier([Date]),"YYYY-MM")),[KM])

Last KM Value of the month=maxx(filter(table,[Asset] =earlier([Asset]) && format([Date],"YYYY-MM") =format(earlier([end of month]),"YYYY-MM")),[Date])
Anonymous
Not applicable

Te mateunas una leyenda, un salvavidas. Estaba tratando de usar Anteriormente, pero seguía pensando que sólo rerfers a la fila anterior que tiene el valor de Columna A. Pero definitivamente me has hecho las cosas más fáciles ahora.

Salud.

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.