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

Cómo cacular una medida para el objeto visual en función de la selección de segmentación inversa

Hola a todos,

Estoy buscando ayuda sobre cómo calcular la medida que resumiría los resultados de la tabla en función de la selección de segmentación de datos del usuario inverso.

La medida es una de muchas dentro del informe (las otras se basan directamente en las selecciones de segmentación de datos).

A continuación se muestra un ejemplo. Mi objetivo es que la celda amarilla contenga un resultado del cálculo para todas las sociedades diferentes a CH10.

Example.JPG

Estaría muy agradecido por la ayuda.

saludos

Krzysztof

1 ACCEPTED SOLUTION

@kb1ws mi mal que debería ser

measures = 
VAR __CompanyCode =   VALUES ( Table[CompanyCode] ) 
VAR __selectedCompanyCode = SELECTEDVALUE ( Table[CompanyCode] )
RETURN
CALCULATE( 
SUM ( Table[Active] ), 
ALL ( Table[CompanyCode] ) , 
IF ( __selectedCompanyCode == BLANK(), 1 , NOT Table[CompanyCode] IN __CompanyCode ) 
)

Me gustaría elogiossi mi solución me ayudó.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!



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.

View solution in original post

9 REPLIES 9
v-deddai1-msft
Community Support
Community Support

Hola @kb1ws ,

¿Podría crear primero una tabla calculada para la segmentación de sociedades?

_slicer = values('Table'[Company Code])

A continuación, utilice la siguiente medida para obtener el cálculo de todas las sociedades diferentes a los valores seleccionados de la segmentación de datos.

Measure =

VAR  slicer = VALUES('Slicer'[Company Code])

RETURN

CALCCULATE(SUM('Table'[Values]),FILTER(ALL('Table'), NOT('Table'[Company Code] in _slicer)))

Saludos

Dedmon Dai

Anonymous
Not applicable

@v-deddai1-msft agradece sus comentarios.

Probé su solución propuesta, pero desafortunadamente se quedan en blanco como resultado del cálculo.

Definí la tabla como usted instruyó, incluyendo los nombres precisos que se ve así:

_slicer valores('Fuente AO'[Código de empresa])
A continuación, definió la medida:
MeasureTEST - Cortadora de VAR - VALORES(_slicer[Código de la empresa])
devolución
CALCULATE(SUM('AO source'[Management base period]),FILTER(ALL('AO source'), NOT('AO source'[Company Code] in _slicer)))
Pero al mostrar el valor de medida en cualquier objeto visual (tabla, tarjeta, etc.) Como resultado, me quedo en blanco.
¿Qué estoy haciendo mal?

saludos

Krzysztof

@kb1ws probé la solución que propuse, nunca aclaró que si funcionaba o no.



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.

parry2k
Super User
Super User

@kb1ws intente seguir la siguiente medida, cambie el nombre de la columna y la tabla según el modelo

measures = 
VAR __CompanyCode =   VALUES ( Table[CompanyCode] ) 
VAR __selectedCompanyCode = SELECTEDVALUE ( Table[CompanyCode] )
RETURN
CALCULATE( 
SUM ( Table[Active] ), 
ALL ( Table[CompanyCode] ) , 
IF ( __selectedCompanyCode == BLANK(), 1 , NOT Table[CompanyCode] IN __room ) 
)

Me 💖Kudos 🙂 si mi solución me ayudara. Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!



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

@parry2k gracias por la ayuda.

Lo cansé hace un momento y tengo una pregunta. ¿A qué se refiere el componente '__room' de la línea siguiente? Supongo que debe ser una tabla calculada, pero no la he definido. Supongo que es una tabla que captura dinámicamente las selecciones de la segmentación. ¿Sabes cómo crearlo?

IF ( __selectedCompanyCode == BLANK(), 1 , NOT Table[CompanyCode] IN __room ) 

saludos

Krzysztof

Anonymous
Not applicable

Para ilustrar un poco mejor la medida que actualicé con mis nombres se ve de una manera siguiente:

medidas de medidas
VAR __CompanyCode - VALORES ( 'Fuente AO'[Código de empresa])
VAR __selectedCompanyCode - SELECTEDVALUE ( 'Fuente AO'[Código de empresa] )
devolución
CALCULAR(
SUM ( 'Fuente AO'[Período de base de gestión] ),
ALL ( 'Fuente AO'[Código de sociedad] ) ,
IF ( __selectedCompanyCode, BLANK(), 1 , NO 'AO source'[Código de sociedad] IN __room )
)
K.

@kb1ws mi mal que debería ser

measures = 
VAR __CompanyCode =   VALUES ( Table[CompanyCode] ) 
VAR __selectedCompanyCode = SELECTEDVALUE ( Table[CompanyCode] )
RETURN
CALCULATE( 
SUM ( Table[Active] ), 
ALL ( Table[CompanyCode] ) , 
IF ( __selectedCompanyCode == BLANK(), 1 , NOT Table[CompanyCode] IN __CompanyCode ) 
)

Me gustaría elogiossi mi solución me ayudó.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!



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

@parry2k ¡¡¡Gracias!!! 🙂

@kb1ws alegro de que haya funcionado.

Me gustaría elogiossi mi solución me ayudó.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!



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.

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.