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, tengo algunos datos que quiero cambiar. No sé qué usar (Escritorio o Consulta). Necesito ayuda para el siguiente:
Datos:
Registro | Usuario | Lugar |
01/01/2020 | A | Mex |
01/01/2020 | B | Mex |
02/01/2020 | C | E.e.u.u |
02/01/2020 | A | enlatar |
02/01/2020 | B | E.e.u.u |
04/01/2020 | B | Mex |
05/01/2020 | C | E.e.u.u |
05/01/2020 | A | Un montón de |
06/01/2020 | B | enlatar |
Resultado:
Usuario | Co1 | Col2 | Col3 |
A | Mex | enlatar | Un montón de |
B | Mex | E.e.u.u | enlatar |
C | E.e.u.u |
Gracias.
Hola
Este código M funciona
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"CheckIn", type date}, {"User", type text}, {"Place", type text}}),
#"Sorted Rows" = Table.Sort(#"Changed Type",{{"CheckIn", Order.Ascending}}),
#"Removed Columns" = Table.RemoveColumns(#"Sorted Rows",{"CheckIn"}),
#"Removed Duplicates" = Table.Distinct(#"Removed Columns"),
Partition = Table.Group(#"Removed Duplicates", {"User"}, {{"Partition", each Table.AddIndexColumn(_, "Index",1,1), type table}}),
#"Expanded Partition" = Table.ExpandTableColumn(Partition, "Partition", {"Place", "Index"}, {"Place", "Index"}),
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Expanded Partition", {{"Index", type text}}, "en-IN"), List.Distinct(Table.TransformColumnTypes(#"Expanded Partition", {{"Index", type text}}, "en-IN")[Index]), "Index", "Place")
in
#"Pivoted Column"
Espero que esto ayude.
Gracias. Funciona.
Cuando intento hacer lo mismo con un csv, no es posible.
¿Qué puedo hacer?.
Realmente @Ashish_Mathur ?
¿Puede explicarme cuál es la mejora o el edvantage a mi respuesta?
No comprobas tu respuesta antes de publicar la mía.
Hola @LuisELopez
eche un vistazo al archivo PBIX adjunto.
Aquí puede encontrar información sobre los pasos más importantes.
https://www.excelguru.ca/blog/2018/06/27/number-rows-by-group-using-power-query/
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 |