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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register 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
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors