The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
So i have this table with concepts, the id and score . I need to repeat for example the first row with the concept and the id, 4 times, the second just 1, the third 4, and so on. Because i need to make a wordcloud visual with this data to make the concept bigger based on the times its repeated. The visual MUST be a wordcloud, so i cant change it.
Solved! Go to Solution.
Hi,
This M code does the job
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"
Hope this helps.
Refer if this can help
https://powerbi.microsoft.com/en-us/blog/visual-awesomeness-unlocked-the-word-cloud/
Hi,
This M code does the job
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"
Hope this helps.
Thank you very much! This did what i needed!
You are welcome.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
94 | |
94 | |
86 | |
69 | |
65 |
User | Count |
---|---|
232 | |
128 | |
116 | |
82 | |
82 |