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

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.

Reply
NenadV
Helper III
Helper III

La rebanadora no filtra la imagen

Tengo modelo de datos con tres tablas:

model.png

y aquí están los datos de estas tablas:

data.png

y ahora quiero crear un informe con una segmentación de datos con valores nameA, y una tabla, con la columna nameB y el número de filas en la tabla C, así que creé measure: Measure - COUNTROWS(Table C) + 0 (Agregué +0 al final porque quiero mostrar 0 en lugar de BLANK cuando no hay filas en la Tabla C que coincidan con la selección). Algo como esto:

report.png

y aquí está el problema, cuando selecciono algún valor de la segmentación de datos, "a" por ejemplo, esto es lo que obtengo:

report2.png

pero eso no es lo que esperaba, sólo quiero ver:

a0
aa1
Aaa2

Por lo tanto, la segmentación de datos está filtrando los valores de la tabla C y contandolos, pero no filtra los valores de columna nameB.

Traté de quitar +0 de la medida y ahora está regresando sólo

a
aa1
Aaa2

como se esperaba.

¿Puede alguien por favor explicarme lo que está sucediendo aquí, y cómo puedo obtener el resultado deseado.

1 ACCEPTED SOLUTION
AllisonKennedy
Super User
Super User

Puedes intentar hacer

Medida: SUMX (TableB, 0 + COUNTROWS(C))

Agregar +0 a una medida puede actuar como una combinación cruzada o filtros claros cuando hay varias relaciones de tabla implicadas.


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

View solution in original post

3 REPLIES 3
BA_Pete
Super User
Super User

Kudo'd OP para una petición muy bien presentada y clara. ¡Un ejemplo de cómo deben verse las solicitudes de ayuda!



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




AllisonKennedy
Super User
Super User

Puedes intentar hacer

Medida: SUMX (TableB, 0 + COUNTROWS(C))

Agregar +0 a una medida puede actuar como una combinación cruzada o filtros claros cuando hay varias relaciones de tabla implicadas.


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

Muchas gracias @AllisonKennedy, me ayudaste mucho. Su solución está funcionando bien.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.