March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hola
Necesito ayuda para crear una columna calculada y necesito averiguar el DÍA entre dos fechas que están en las diferentes tablas.
Fecha de entrega - Fecha de envío = DÍA
Cuadro 1
Fecha de envío |
1-ene-23 |
1-ene-23 |
2-ene-23 |
3-ene-23 |
4-ene-23 |
5-ene-23 |
5-ene-23 |
9-ene-23 |
11-ene-23 |
11-ene-23 |
12-ene-23 |
13-ene-23 |
11-ene-23 |
14-ene-23 |
13-ene-23 |
14-ene-23 |
16-ene-23 |
17-ene-23 |
14-ene-23 |
16-ene-23 |
18-ene-23 |
13-ene-23 |
17-ene-23 |
8-ene-23 |
13-ene-23 |
Cuadro 2
Fecha de entrega |
1-ene-23 |
2-ene-23 |
3-ene-23 |
4-ene-23 |
5-ene-23 |
7-ene-23 |
10-ene-23 |
10-ene-23 |
11-ene-23 |
12-ene-23 |
14-ene-23 |
14-ene-23 |
15-ene-23 |
15-ene-23 |
16-ene-23 |
17-ene-23 |
17-ene-23 |
17-ene-23 |
18-ene-23 |
18-ene-23 |
18-ene-23 |
19-ene-23 |
19-ene-23 |
20-ene-23 |
20-ene-23 |
Resultado
Fecha de envío | Fecha de entrega | Diff |
1-ene-23 | 1-ene-23 | 0 |
1-ene-23 | 2-ene-23 | 1 |
2-ene-23 | 3-ene-23 | 1 |
3-ene-23 | 4-ene-23 | 1 |
4-ene-23 | 5-ene-23 | 1 |
5-ene-23 | 7-ene-23 | 2 |
5-ene-23 | 10-ene-23 | 5 |
9-ene-23 | 10-ene-23 | 1 |
11-ene-23 | 11-ene-23 | 0 |
11-ene-23 | 12-ene-23 | 1 |
12-ene-23 | 14-ene-23 | 2 |
13-ene-23 | 14-ene-23 | 1 |
11-ene-23 | 15-ene-23 | 4 |
14-ene-23 | 15-ene-23 | 1 |
13-ene-23 | 16-ene-23 | 3 |
14-ene-23 | 17-ene-23 | 3 |
16-ene-23 | 17-ene-23 | 1 |
17-ene-23 | 17-ene-23 | 0 |
14-ene-23 | 18-ene-23 | 4 |
16-ene-23 | 18-ene-23 | 2 |
18-ene-23 | 18-ene-23 | 0 |
13-ene-23 | 19-ene-23 | 6 |
17-ene-23 | 19-ene-23 | 2 |
8-ene-23 | 20-ene-23 | 12 |
13-ene-23 | 20-ene-23 | 7 |
Agregaré el DAX a continuación para obtener el resultado final.
Diferencia de fecha =
VAR _diff = TABLA 2 Fecha de envío - Tabla 1 Fecha de entrega, DÍA
DEVOLUCIÓN
SWITCH ( TRUE (),
_diff >= 0 && _diff <= 2, "0-02 días",
_diff >= 3 && _diff <= 7, "03-07 días",
_diff >= 8 && _diff <= 14, "08-14 días",
_diff >= 15 && _diff <= 21, "15-21 días",
_diff >= 22 && _diff <= 30, "22-30 días",
_diff > 30, "más de 31 días", "Error de fecha")
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.