Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
gushal
Frequent Visitor

Mostrar si existe un registro en otra tabla

Hola

Soy nuevo en Power BI y necesito ayuda. A continuación me pasa mi problema:

Tenemos una tabla de oportunidades y una tabla de pedidos de ventas. Una oportunidad puede tener varios pedidos de ventas.

Quiero mostrar en una matriz, cuántas de las oportunidades que tiene uno o varios pedidos de ventas conectados a ella, es decir, no me importa si hay varios pedidos de ventas, sólo quiero mostrar si la oportunidad tiene algún pedido de ventas o ninguno en absoluto.

Quiero mostrarlo en porcentaje del recuento total de oportunidades.

Por ejemplo: en una tienda hay 5000 oportunidades y 8000 pedidos de ventas. Pero solo 3000 de estas oportunidades han conectado pedidos de ventas, lo que significa que el 60% de las oportunidades tienen uno o varios pedidos de ventas:

gushal_0-1607413388482.png

¿Cómo creo esto?

Gracias de antemano

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hola, @gushal

Basándome en la información que usted proporciona actualmente, hice una muestra aquí.

Measure = 
var Measure1 = CALCULATE(DISTINCTCOUNT('Sales order table'[opportunities]),ALLEXCEPT('Sales order table','Sales order table'[Store]))
var Measure2 = CALCULATE(DISTINCTCOUNT('opportunity table'[opportunities]),ALLEXCEPT('opportunity table','opportunity table'[Store]))
return  Measure2/Measure1

Si no cumple con su requisito actual, por favor comparta información sobre sus dos tablas.

Saludos
Equipo de soporte de la comunidad _ Eason

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hola, @gushal

¿Podría decirme si su problema ha sido resuelto?
En caso afirmativo, podría aceptar la respuesta útil como solución. También podría compartir su propia solución aquí. Por ahora, no hay contenido de descripción en el subproceso. Si todavía necesita ayuda, por favor comparta más detalles con nosotros.

Saludos
Equipo de soporte de la comunidad _ Eason

v-easonf-msft
Community Support
Community Support

Hola, @gushal

Basándome en la información que usted proporciona actualmente, hice una muestra aquí.

Measure = 
var Measure1 = CALCULATE(DISTINCTCOUNT('Sales order table'[opportunities]),ALLEXCEPT('Sales order table','Sales order table'[Store]))
var Measure2 = CALCULATE(DISTINCTCOUNT('opportunity table'[opportunities]),ALLEXCEPT('opportunity table','opportunity table'[Store]))
return  Measure2/Measure1

Si no cumple con su requisito actual, por favor comparta información sobre sus dos tablas.

Saludos
Equipo de soporte de la comunidad _ Eason

AllisonKennedy
Super User
Super User

Debe tener valores coincidentes en ambas tablas: ¿hay un identificador de oportunidad en la tabla Pedido de ventas? ¿Cómo sabes si están en ambas mesas?

Comparta los datos de ejemplo o al menos los nombres de columna y tabla con algunos valores de ejemplo.


Please @mention me in your reply if you want a response.

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.