Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Buenas tardes a todos!
Tengo una tabla similar a la que les muestro a continuación:
| Gerencia | Nombre | Apellido | Puesto | Capacit. 1 | Capacit. 2 | Capacit. 3 | Capacit. 4 | Capacit. 5 | Capacit. 6 |
| A | Juan | Perez | Analista | SI | SI | NO | SI | SI | NO |
| A | Pedro | Lopez | Ingeniero | NO | NO | NO | SI | SI | NO |
| B | María | Gutierrez | Jefe | SI | NO | NO | SI | SI | NO |
| B | Juliana | Suarez | Gerente | SI | NO | NO | SI | SI | NO |
| C | Claudia | Gimenez | Inspector | SI | NO | NO | SI | SI | NO |
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
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.
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
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!
@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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.