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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

Contar valores en varias columnas

Buenas tardes a todos!

 

Tengo una tabla similar a la que les muestro a continuación:

 

GerenciaNombre ApellidoPuestoCapacit. 1Capacit. 2Capacit. 3Capacit. 4Capacit. 5Capacit. 6
AJuanPerezAnalistaSISINOSISINO
APedroLopezIngenieroNONONOSISINO
BMaríaGutierrezJefeSINONOSISINO
BJulianaSuarezGerenteSINONOSISINO
CClaudiaGimenezInspectorSINONOSISINO

 

Necesito poder contar el total de capacitaciones a realizar, es decir cada celda desde la Columna Capacit. 1 hasta Capacitaci. 6 y despues poder hacer lo mismo pero filtrando por si o por no.

 

Se les ocurre como ayudarme?

 

Gracias!

Ezequiel

3 REPLIES 3
Mariusz
Community Champion
Community Champion

Hola @Ezequielm

Encuentre el archivo adjunto con una solución, la tabla original dividida en dos tablas y unpivot aplicado.

Avisarme si necesita más aclaraciones.

Saludos
Mariusz

Si este post ayuda, entonces considere aceptarlo como la solución.

Por favor, siéntase libre de conectarse conmigo.
Linkedin

harshnathani
Community Champion
Community Champion

Hola @Ezequielm ,

Primero tendrá que desaprecir la columna en Power Query.

Utilice este archivo . Vaya a Advance Editor y pegue este código.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("jY5NCsJADIXvMuteohYpFisFV1K6CDbWwJgp87Oopzczg4oo0k3eS0K+l75XpSpUE4BFOrR4Fy0Z9OK8uBO6Vz2Y78FQZECHo43rvZkTYcsTMaJ9nr3LD8BGbAt2EamDJ7T5i+pKePlM/0dogiZgEHcMkAmt9FN6YgWjipEawkiRUdMNOUF27GY8e7MGMzwA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Management = _t, Number = _t, Surname = _t, Put = _t, #"Ability. 1" = _t, #"Ability. 2" = _t, #"Ability. 3" = _t, #"Ability. 4" = _t, #"Ability. 5" = _t, #"Ability. 6" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Management", type text}, {"Number", type text}, {"Surname", type text}, {"Put", type text}, {"Ability. 1", type text}, {"Ability. 2", type text}, {"Ability. 3", type text}, {"Ability. 4", type text}, {"Ability. 5", type text}, {"Ability. 6", type text}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Management", "Number", "Surname", "Put"}, "Attribute", "Value"),
    #"Merged Columns" = Table.CombineColumns(#"Unpivoted Other Columns",{"Number", "Surname"},Combiner.CombineTextByDelimiter(" ", QuoteStyle.None),"Merged"),
    #"Renamed Columns" = Table.RenameColumns(#"Merged Columns",{{"Merged", "Name"}, {"Attribute", "Training"}})
in
    #"Renamed Columns"

A continuación, cree una medida

Total de Entrenamientos - COUNTAX(FILTER('Table','Table'[Valor] - "Sí"), 'Tabla'[Valor])
1.jpg


saludos

Harsh Nathani


Apreciar con un Kudos!! (Haga clic en el botón Pulgares arriba)

¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!

amitchandak
Super User
Super User

@Ezequielm , creo que necesitas despivot la columna de habilidad.

https://radacad.com/pivot-and-unpivot-with-power-bi
Transponer : https://yodalearning.com/tutorials/power-query-helps-transposing-data/

Puede compartir la salida de muestra que necesita de esta entrada

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.