Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Tengo dos tablas como se muestra a continuación. Quiero validar y hacer coincidir los valores de la columna Producto de la tabla 1 con la columna Producto de la Tabla 2, de lo contrario, debería devolver "Valor incorrecto".
En lugar de crear una tabla de búsqueda, ¿se puede hacer a través de la medida? Pls sugieren la mejor opción.
Tabla 1
ID de referencia | Producto | Categoría |
2349898729 | Ww | Y |
2449898728 | Ww | Y |
2549898727 | Ww | O |
2649898726 | Ww | O |
2749898725 | Kk | Y |
2849898724 | Kk | Y |
2949898723 | Kk | Y |
3049898722 | Kk | Y |
3149898721 | Kk | W |
3249898720 | Ww | E |
3349898719 | Ww | E |
3449898718 | Tt | R |
3549898717 | Tt | R |
3649898716 | Tt | R |
3749898715 | Tt | R |
3849898714 | Pp | M |
3949898713 | Pp | M |
4049898712 | Lk | N |
Tabla 2
Producto | Categoría |
Ww | Y |
Ww | O |
Kk | Y |
Tt | R |
Pp | M |
Pp | N |
Cómo se debe mostrar el resultado
ID de referencia | Producto | Categoría | Resultado |
2349898729 | Ww | Y | Válido |
2449898728 | Ww | Y | Válido |
2549898727 | Ww | O | Válido |
2649898726 | Ww | O | Válido |
2749898725 | Kk | Y | Válido |
2849898724 | Kk | Y | Válido |
2949898723 | Kk | Y | Válido |
3049898722 | Kk | Y | Válido |
3149898721 | Kk | W | Válido |
3249898720 | Ww | E | Válido |
3349898719 | Ww | E | Válido |
3449898718 | Tt | R | Válido |
3549898717 | Tt | R | Válido |
3649898716 | Tt | R | Válido |
3749898715 | Tt | R | Válido |
3849898714 | Pp | M | Válido |
3949898713 | Pp | M | Válido |
4049898712 | Lk | N | Valor incorrecto |
Solved! Go to Solution.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Puedes intentarlo
Measure =
var _sv = RIGHT(SELECTEDVALUE(Table1[Ref ID]),2)
VAR _LU = Calculate( FIRSTNONBLANK( Table 2[Category],0 ) , Table 2[Product] = _sv )
var _CV = Table1(ProductCategory)
RETURN
IF ( _LU = _SV, "Valid", "Incorrect Value" )
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
Puedes intentarlo
Measure =
var _sv = RIGHT(SELECTEDVALUE(Table1[Ref ID]),2)
VAR _LU = Calculate( FIRSTNONBLANK( Table 2[Category],0 ) , Table 2[Product] = _sv )
var _CV = Table1(ProductCategory)
RETURN
IF ( _LU = _SV, "Valid", "Incorrect Value" )
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com