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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Syndicate_Admin
Administrator
Administrator

Necesita ayuda sobre la transformación de datos

¡Felices fiestas a todos! Necesita ayuda para transformar estos datos que provienen de la herramienta cliente de la siguiente manera:

Nombre1.11.1 Puntuación1.21.2 Puntuación2.12.2 Puntuación
Nombre 1Asistencia100%Calidad85%Adherencia60%
Nombre 2Asistencia50%Productividad0%SLA75%

El resultado que estoy tratando de lograr sería:

NombreAtributoPuntuación
Nombre 1Asistencia100%
Nombre 1Calidad85%
Nombre 1Adherencia60%
Nombre 2Asistencia50%
Nombre 2Productividad0%
Nombre 2SLA75%

Intenté despivotar columnas / despivotar otras columnas una columna a la vez y también simultáneamente, pero no obtengo el resultado deseado. Para agregar contexto, debo crear un objeto visual para mostrar el recuento de instancias de puntuación del 0% por atributo/métrica.

Cualquier solución sería de gran ayuda 🙇

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

¡Gracias, señor! trabajo impresionante.. Tuve que mirar cada paso para entender lo que sucedió

Bastante creativo para usar el 1.1 etc para agrupar columnas. ¡Lo agradezco!

Estoy feliz de saber que podría ayudar. 🙂 Si algunos pasos no están claros para usted (por qué lo hice), solo pregunte.

P.S. No es importante, pero soy una chica 😁 No "señor".

Lo siento >< muchas gracias Sra. Bolfri y felices fiestas

Syndicate_Admin
Administrator
Administrator

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8kvMTVUwVNJRciwpSc1LScxLTgVyDA0MdAwMVIGswNLEnMySSiDLwhQq5JiSkVqUClFoBlEXqwM1yQjdJFOYQQFF+SmlySWZZRDTYMLBPo5A0hxidmwsAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, #"1.1" = _t, #"1.1 Score" = _t, #"1.2" = _t, #"1.2 Score" = _t, #"2.2" = _t, #"2.2 Score" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}, {"1.1", type text}, {"1.1 Score", Percentage.Type}, {"1.2", type text}, {"1.2 Score", Percentage.Type}, {"2.2", type text}, {"2.2 Score", Percentage.Type}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Name"}, "Context", "Value"),
#"Added Custom" = Table.AddColumn(#"Unpivoted Columns", "Type", each if Text.Contains([Context],"Score") then "Score" else "Attribute"),
#"Pivoted Column" = Table.Pivot(#"Added Custom", List.Distinct(#"Added Custom"[Type]), "Type", "Value"),
#"Extracted Text Before Delimiter" = Table.TransformColumns(#"Pivoted Column", {{"Context", each Text.BeforeDelimiter(_, " "), type text}}),
#"Grouped Rows" = Table.Group(#"Extracted Text Before Delimiter", {"Name", "Context"}, {{"Attribute", each List.Max([Attribute]), type nullable text}, {"Score", each List.Max([Score]), type nullable number}})
in
#"Grouped Rows"

Antes:

bolfri_0-1671837374084.png

Después:

bolfri_1-1671837385851.png

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors