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.
Hola, tengo tres tablas que tienen una relación de filtro cruzado de muchos a uno con la tabla Main y las dos tablas secundarias respectivamente.
Tabla principal:
Clave | Estudiante | Pasar |
1 | A | 1 |
2 | B | 0 |
Tabla secundaria 1:
Clave | School_Decile |
1 | 1 |
2 | 2 |
3 | 3 |
Tabla secundaria 2:
Clave | School_Decile |
1 | 2 |
2 | 4 |
3 | 2 |
Me gustaría crear una nueva columna dentro de la tabla principal que hace referencia a la columna Pass (de la tabla Main) y a New School Decile de la tabla Secundaria 1 y la tabla secundaria 2 respectivamente.
Mi salida deseada es tener la nueva columna en la tabla principal:
Clave | Estudiante | Pasar | Nueva columna |
1 | A | 1 | Se trasladó a la disminución del decil |
2 | B | 0 | Fallado |
Nueva columna ?
IF (Main[Pass]-0, "Failed",
IF (Tabla secundaria 1 [School_Decile] > Tabla secundaria 2[School_Decile], "Moved to higher decile",
IF (Tabla secundaria 1 [School_Decile] < Tabla secundaria 2 [School_Decile], "Moved to lower decile",
IF (Tabla secundaria 1 [School_Decile] - Tabla secundaria 2 [School_Decile], "Moved to same decile",
"IFERROR"))))
¿Cómo creo el DAX en una nueva columna dentro de la tabla Main que hace referencia a las tres tablas?
Cualquier entrada sería muy apreciada, muchas gracias de antemano!
Solved! Go to Solution.
@em12963 agregar la siguiente expresión para la nueva columna en la tabla principal
New column =
SWITCH (TRUE(),
Main[Pass]=0, "Failed",
RELATED('Secondary table 1'[School_Decile]) > RELATED('Secondary table 2'[School_Decile]), "Moved to higher decile",
RELATED('Secondary table 1'[School_Decile]) < RELATED('Secondary table 2'[School_Decile]), "Moved to lower decile",
RELATED('Secondary table 1'[School_Decile])= RELATED('Secondary table 2'[School_Decile]), "Moved to same decile", “IFERROR”,
"Unknown" --catch all
)
Me gustaría❤ elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
⚡Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@em12963 agregar la siguiente expresión para la nueva columna en la tabla principal
New column =
SWITCH (TRUE(),
Main[Pass]=0, "Failed",
RELATED('Secondary table 1'[School_Decile]) > RELATED('Secondary table 2'[School_Decile]), "Moved to higher decile",
RELATED('Secondary table 1'[School_Decile]) < RELATED('Secondary table 2'[School_Decile]), "Moved to lower decile",
RELATED('Secondary table 1'[School_Decile])= RELATED('Secondary table 2'[School_Decile]), "Moved to same decile", “IFERROR”,
"Unknown" --catch all
)
Me gustaría❤ elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
⚡Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
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 |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |