Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hola, chicos
me encanta este foro, tantos grandes consejos, muy útil!
Tengo un problema con mi mesa que me causa dolores de cabeza, espero que alguien pueda ayudarme con esto.
Este es mi status quo (simplificado)
A cada producto se le asigna un número diferente de códigos ICD (entre 1 y 130 CIE). Son productos médicos y el código icD (por ejemplo, A16.12) muestra la condición médica (por ejemplo, dolor de cabeza) para la que está aprobado el medicamento (por ejemplo, aspirina).
Producto | Ingresos | Texto antes del delimitador | Texto antes del delimitador |
Producto A | 1 EUR | A16.12 | A23.9 |
Producto B | 2 EUR | A16.12 | A24 |
Producto C | 1 EUR | D15 | A24 |
La siguiente tabla muestra mi salida deseada.
Me gustaría reorganizar la tabla, de modo que pueda ver los ingresos no basados en el producto individual, sino basados en códigos ICD. La siguiente tabla muestra mi salida deseada.
Producto | Ingresos | A16.12 | D15 | A23.9 | A24 |
Producto A | 1 EUR | 1 EUR | 1 EUR | ||
Producto B | 2 EUR | 2 EUR | 2 EUR | ||
Producto C | 1 EUR | 1 EUR | 1 EUR |
¡Esperamos saber de ti!
@Beginner solución de conexión.
Me gustaría❤ elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
⚡Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionadas con Power BI.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Desafortunadamente, el archivo de solución no se abre para mí - ¿Podría publicar una captura de pantalla de la solución? ¡Sería genial! ¡Gracias por tu ayuda!
@Beginner está recibiendo cualquier error, adjuntado de nuevo.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k ¡Muchas gracias por la solución! Así que básicamente tengo que despivod las columnas "Texto antes del delimitador", ¿correcto?
@Beginner sí señor, eso es todo. Lo tienes.
Me gustaría❤ elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
⚡Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionadas con Power BI.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Desafortunadamente, el archivo no se abre. ¿Podría publicar una captura de pantalla de la solución?
Aquí hay una mejor versión de las tablas. La primera tabla es el status quo y la segunda tabla es la salida deseada.
Hola
Este código M funciona
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Product", type text}, {"Revenue", type text}, {"Text Before Delimiter", type text}, {"Text Before Delimiter2", type text}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Product", "Revenue"}, "Attribute", "Value"),
#"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"}),
#"Duplicated Column" = Table.DuplicateColumn(#"Removed Columns", "Revenue", "Revenue - Copy"),
#"Pivoted Column" = Table.Pivot(#"Duplicated Column", List.Distinct(#"Duplicated Column"[Value]), "Value", "Revenue")
in
#"Pivoted Column"
Espero que esto ayude.
aquí está el código M para el Editor de consultas:
Mesa
Dejar
Source : Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCijKTylNLlFwVNJRMlRwDQ0C0C0o6GZnqGGGGkbGepVKsDkZE1DUCFOZCYoiZySzXAxNYSpiAQ", BinaryEncoding.Base64), Compression.Deflate)), let _t á ((tipo de texto que acepta valores NULL) meta [Serialized.Text ? true]) en la tabla de tipos [Producto - _t, Ingresos - _t, "Texto antes del delimitador" - _t, "Texto antes del delimitador.1" - _t]),
Tab1Selected ? Table.SelectColumns(Source,"Product", "Revenue", "Text Before Delimiter.1")
Tab1 - Table.RenameColumns(Tab1Selected,-"Text Before Delimiter.1", "Text Before Delimiter"-),
Tab2 - Table.SelectColumns(Source,-"Product", "Revenue", "Text Before Delimiter"-),
Custom1 - Tab1 & Tab2,
"Columna precedida" - Table.Pivot(Custom1, List.Distinct(Custom1[-"Text Before Delimiter"]), "Text Before Delimiter", "Revenue")
En
"Columna pivotada"
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |