Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Querida comunidad, ayuda de las peleas
Nuevo pero con ganas de aprender Power BI:-)
Estoy tratando de encontrar una solución que me dé el valor anterior de fecha/fila y también agruparlo por la clave/elementos
Esto es tener un historial que muestra las fechas de inicio y finalización.
Así es como se vería:
Antes:
Artículo | País | Fecha |
1 | Dk | 03/04/2020 |
2 | Dk | 03/04/2020 |
4 | SE | 04/04/2020 |
2 | DE | 03/05/2020 |
3 | Dk | 03/05/2020 |
3 | Dk | 21/05/2020 |
1 | SE | 05/04/2020 |
1 | DE | 10/04/2020 |
2 | SE | 03/06/2020 |
4 | DE | 10/04/2020 |
2 | Dk | 10/06/2020 |
3 | Dk | 21/05/2020 |
3 | SE | 21/05/2020 |
1 | DE | 20/04/2020 |
Noche:
Artículo | País | ChangeDate | Fecha anterior | días entre semana |
1 | Dk | 03/04/2020 | 03/04/2020 | 1 |
1 | SE | 05/04/2020 | 03/04/2020 | 1 |
1 | DE | 10/04/2020 | 05/04/2020 | 5 |
1 | DE | 20/04/2020 | 10/04/2020 | 7 |
2 | Dk | 03/04/2020 | 03/04/2020 | 1 |
2 | DE | 03/05/2020 | 03/04/2020 | 21 |
2 | SE | 03/06/2020 | 03/05/2020 | 23 |
2 | Dk | 10/06/2020 | 03/06/2020 | 6 |
3 | Dk | 03/05/2020 | 03/05/2020 | 0 |
3 | Dk | 21/05/2020 | 03/05/2020 | 14 |
3 | Dk | 21/05/2020 | 21/05/2020 | 1 |
3 | SE | 21/05/2020 | 21/05/2020 | 1 |
4 | SE | 04/04/2020 | 04/04/2020 | 0 |
4 | DE | 10/04/2020 | 04/04/2020 | 5 |
Solved! Go to Solution.
Usted puede obtener
Fecha anterior - combinar(maxx(filter(Table,[Item] ?earlier([Item]) && [País] ?earlier([Country]) && [ChangeDate] <earlier([ChangeDate]) ),[ChangeDate]),[ChangeDate])
Diferencia de fecha ( [ChangeDate] ,[Fecha anterior],Día)
Para los días hábiles es necesario utilizar el calendario . recomienda
https://www.sqlbi.com/articles/counting-working-days-in-dax/
Usted puede obtener
Fecha anterior - combinar(maxx(filter(Table,[Item] ?earlier([Item]) && [País] ?earlier([Country]) && [ChangeDate] <earlier([ChangeDate]) ),[ChangeDate]),[ChangeDate])
Diferencia de fecha ( [ChangeDate] ,[Fecha anterior],Día)
Para los días hábiles es necesario utilizar el calendario . recomienda
https://www.sqlbi.com/articles/counting-working-days-in-dax/