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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors
Top Kudoed Authors