cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

El valor medio forma un filtro de columna de filtro por categorías

Así que tengo una tabla que tiene una columna con valores y otra con la categoría "Nacional" o "Internacional". ¡Necesito calcular el porcentaje promedio de los valores en la categoría nacional! Y sólo devolver el valor en % para que pueda verlo en una tarjeta.

Este es el tipo de datos que tengo

CategoríaValor
Nacional113,240,040
Importador106,828,146
Nacional97,134,688
Importador94,064,210
Importador90,575,333
Nacional35,319,980

Y la necesidad de devolver este visual

Need to get back this visualNecesidad de recuperar este visual

He hecho esto

National =CALCULATE(COUNTA('SEGUIMIENTO'[Category]),'SEGUIMIENTO'[Value] IN { "Nacional" })

%National =DIVIDE([National], COUNTA('SEGUIMIENTO'[Value]))

Pero no ajusta la respuesta correcta

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

I'm on a phone so sorry for the short answer, but change the countrows to sumx. You will need an extra argument:

%National =DIVIDE(SUMX(FILTER(ALL('SEGUIMIENTO'), 'SEGUIMIENTO'[Category] = "Nacional"),
'Seguimiento'[value]
)
,
SUMX(ALL('SEGUIMIENTO') , Seguimiento[value])
)

 


______________


Has this post solved your problem? Please mark it as a 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.


I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 


excelwithallison.com

View solution in original post

6 REPLIES 6
Highlighted
Super User II
Super User II

Tratar:
%Nacional-DIVIDE(CALCULATE(COUNTROWS(FILTER(ALL('SEGUIMIENTO'), 'SEGUIMIENTO'[Category] á "Nacional"), CALCULATE(COUNTROWS(ALL('SEGUIMIENTO')
)

Puede reemplazar ALL por ALLSELECTED dependiendo de si desea que este porcentaje se actualice con selecciones de segmentación de datos.

 


______________


Has this post solved your problem? Please mark it as a 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.


I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 


excelwithallison.com

Highlighted

Hola Alison,
gracias por responder.
Pero la respuesta me da un porcentaje del 96% y debería ser 86 hay algo que power bi no me está entendiendo 😂. Lo necesito no para contar las filas, sino el porcentaje del dinero total. No sé si me entiendes. Si lo hago en un pastel me muestra la respuesta correcta.

Captura de pantalla 2020-09-20 123940.jpg

Pero, muy supervisor quiere verlo en una tarjeta.

Highlighted

¿Qué ha puesto en valores para ese gráfico circular?

 


______________


Has this post solved your problem? Please mark it as a 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.


I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 


excelwithallison.com

Highlighted

I'm on a phone so sorry for the short answer, but change the countrows to sumx. You will need an extra argument:

%National =DIVIDE(SUMX(FILTER(ALL('SEGUIMIENTO'), 'SEGUIMIENTO'[Category] = "Nacional"),
'Seguimiento'[value]
)
,
SUMX(ALL('SEGUIMIENTO') , Seguimiento[value])
)

 


______________


Has this post solved your problem? Please mark it as a 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.


I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 


excelwithallison.com

View solution in original post

Highlighted

I have it in spanish but, 

  • In the legend space I have "category"
  • In the values space I have "Value or $"

Like you see in the image below

Captura de pantalla 2020-09-20 150004.jpg

 

 

Highlighted

Yeyy thank you.

Im new on this matter i've learned all by myself but at work i always find something more challenging stuff!

💌

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors