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.
Tengo 2 tablas como se define a continuación.
Tabla 1:
IDENTIFICACIÓN | Fecha | Departamento |
1 | 2022/02 | A |
2 | 2022/02 | A |
3 | 2022/02 | B |
4 | 2022/02 | B |
1 | 2022/03 | A |
2 | 2022/03 | A |
3 | 2022/03 | B |
4 | 2022/03 | C |
1 | 2022/04 | C |
2 | 2022/04 | A |
3 | 2022/04 | D |
4 | 2022/04 | C |
Cuadro 2
IDENTIFICACIÓN | Fecha |
1 | 2022/04 |
2 | 2022/03 |
3 | 2022/02 |
4 | 2022/04 |
Por lo tanto, quiero agregar la columna Dept en la Tabla 2 de modo que coincida con ID y Fecha de la Tabla 1. Por ejemplo, si agrego una nueva columna de Dept para la Tabla 2 será como:
IDENTIFICACIÓN | Fecha | Departamento |
1 | 2022/04 | C |
2 | 2022/03 | A |
3 | 2022/02 | B |
4 | 2022/04 | C
|
¿Alguna idea de cómo puedo lograr esto?
Solved! Go to Solution.
Dept =
var currentID = 'Table 2'[ID]
var currentDate = 'Table 2'[Date]
return LOOKUPVALUE( 'Table 1'[Dept', 'Table 1'[ID], currentID, 'Table 1'[Date], currentDate)
Dept =
var currentID = 'Table 2'[ID]
var currentDate = 'Table 2'[Date]
return LOOKUPVALUE( 'Table 1'[Dept', 'Table 1'[ID], currentID, 'Table 1'[Date], currentDate)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |