This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA 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.
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
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.