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
Anonymous
Not applicable

Resumir el recuento de ocurrencias de valores particulares de diferentes segmentaciones

¡Hola!

¡Este es mi primer post! 😊

Tengo 6 segmentaciones como se muestra a continuación, los valores (1,2,3,4) provienen de las funciones GENERATESERIES para cada segmentación individual. Los valores seleccionados se reflejan en las cartas del lado izquierdo.

Quiero contar el número de ocurrencias de 1,2,3,4 dinámicamente y aplicar estos recuentos en otra fórmula.

No es posible resumir en una tabla o columna calculada, ya que las segmentaciones de datos no pueden afectar a las columnas o tablas calculadas.

PowerBIComm.JPG

Por favor, ayuda!!!

PBIX: https://drive.google.com/file/d/1hHfVl8NGiKZDoWRpJQX3AdVQLsaZgdxb/view?usp=sharing

@Greg_Deckler @amitchandak @parry2k @Zubair_Muhammad @Seth_C_Bauer @ImkeF @Sean @MFelix @Ashish_Mathur @GilbertQ @TomMartens @MarcelBeug @Vvelarde @mahoneypat @jdbuchanan71

1 ACCEPTED SOLUTION

Sí, la medida que te di funcionará, agregué un +0 al final para que muestre 0 en lugar de (En blanco). Agregué las medidas a su archivo y lo adjuntó.

jdbuchanan71_0-1595366445730.png

View solution in original post

10 REPLIES 10
jdbuchanan71
Super User
Super User

@parthadas1

No estoy seguro de cuáles son los nombres de tabla para la serie 6, pero algo como esto debería funcionar.

1 Count = 
VAR _Item = 1
VAR _1 = COUNTROWS ( FILTER ( 't1', 't1'[Value] = _Item ) )
VAR _2 = COUNTROWS ( FILTER ( 't2', 't2'[Value] = _Item ) )
VAR _3 = COUNTROWS ( FILTER ( 't3', 't3'[Value] = _Item ) )
VAR _4 = COUNTROWS ( FILTER ( 't4', 't4'[Value] = _Item ) )
VAR _5 = COUNTROWS ( FILTER ( 't5', 't5'[Value] = _Item ) )
VAR _6 = COUNTROWS ( FILTER ( 't6', 't6'[Value] = _Item ) )
RETURN _1 + _2 + _3 + _4 + _5 + _6

Necesitaría esta medida 4 veces, una vez para cada opción (1, 2, 3, 4).

jdbuchanan71_0-1595363610300.png

TomMartens
Super User
Super User

Hey @parthadas1 ,


Gracias por el grito, por favor respete mi tiempo proporcionando un pbix que contiene datos de muestra, cargar el pbix a onedrive o dropbox, y compartir el enlace. si está utilizando un archivo xlsx para crear los datos de ejemplo compartir el xlsx también.

saludos
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Edité mi consulta e incluyó el archivo PBIX

jdbuchanan71_0-1595365084880.png

Anonymous
Not applicable

@jdbuchanan71 Lo sentimos, editado y configurar el enlace para abrir el acceso ahora

Sí, la medida que te di funcionará, agregué un +0 al final para que muestre 0 en lugar de (En blanco). Agregué las medidas a su archivo y lo adjuntó.

jdbuchanan71_0-1595366445730.png

Anonymous
Not applicable

@jdbuchanan71 gracias, permítanme un poco de tiempo para probarlo y luego marcará su respuesta como solución! Gracias de nuevo!!

@parthadas1 esto es lo que voy a hacer, añadir medida para cada valor como este.

Count Value 1 = 
VAR __tbl = 
UNION ( 
    { [Parameter1 Value] },
    { [Parameter2 Value] },
    { [Parameter3 Value] },
    { [Parameter4 Value] },
    { [Parameter5 Value] },
    { [Parameter6 Value] }
)
RETURN
COUNTX ( FILTER ( __tbl, [Value] = 1 ), 1 )

Count Value 2 = 
VAR __tbl = 
UNION ( 
    { [Parameter1 Value] },
    { [Parameter2 Value] },
    { [Parameter3 Value] },
    { [Parameter4 Value] },
    { [Parameter5 Value] },
    { [Parameter6 Value] }
)
RETURN
COUNTX ( FILTER ( __tbl, [Value] = 2 ), 1 )

Count Value 3 = 
VAR __tbl = 
UNION ( 
    { [Parameter1 Value] },
    { [Parameter2 Value] },
    { [Parameter3 Value] },
    { [Parameter4 Value] },
    { [Parameter5 Value] },
    { [Parameter6 Value] }
)
RETURN
COUNTX ( FILTER ( __tbl, [Value] = 3 ), 1 )

and so on....



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.

@parthadas1 hacer +0 para medir si desea ver 0 en lugar de BLANK()



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.

Anonymous
Not applicable

@jdbuchanan71y @parry2k sus soluciones son impresionantes, marcados como soluciones! ¡¡Muchas gracias!! este complejo es awesome!!

Helpful resources

Announcements
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.

Top Solution Authors