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.
Así que tengo esta tabla con conceptos, el id y la puntuación . Necesito repetir por ejemplo la primera fila con el concepto y el id, 4 veces, la segunda sólo 1, la tercera 4, y así sucesivamente. Porque necesito hacer un wordcloud visual con estos datos para hacer el concepto más grande basado en las veces que se repite. El objeto visual DEBE ser una nube de palabras, así que no puedo cambiarlo.
Solved! Go to Solution.
Hola
Este código M hace el trabajo
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTK0BBImSrE60UrBMK4hmOuCKuuKyg2BcY3B3EgY1wjM9UM1ygPIMrNAqPaC8yHyTnC+mVJsLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Concepts = _t, ID = _t, Score = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Concepts", type text}, {"ID", Int64.Type}, {"Score", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each {1..[Score]}),
#"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom"),
#"Removed Columns" = Table.RemoveColumns(#"Expanded Custom",{"Score", "Custom"})
in
#"Removed Columns"
Espero que esto ayude.
Consulte si esto puede ayudar
https://powerbi.microsoft.com/en-us/blog/visual-awesomeness-unlocked-the-word-cloud/
Hola
Este código M hace el trabajo
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTK0BBImSrE60UrBMK4hmOuCKuuKyg2BcY3B3EgY1wjM9UM1ygPIMrNAqPaC8yHyTnC+mVJsLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Concepts = _t, ID = _t, Score = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Concepts", type text}, {"ID", Int64.Type}, {"Score", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each {1..[Score]}),
#"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom"),
#"Removed Columns" = Table.RemoveColumns(#"Expanded Custom",{"Score", "Custom"})
in
#"Removed Columns"
Espero que esto ayude.
¡Muchas gracias! ¡Esto hizo lo que necesitaba!
De nada.
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 |