The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Ok I have a API Json data that includes a status fields that is a list of status for each day of the month from 1 to 30 (or 31) depending on the month I extract. What I need is to expand this list to include the status but also the original position/row number so I can match the status to the day of the month any thoughts:
Solved! Go to Solution.
Hi @Stephan_FL
Maybe try indexing.
I think this video will be able to help create a numbered index for each day. Group by the Machine ID
https://www.youtube.com/watch?v=_PBX3RPXxHw
Hope this helps
Joe
If this post helps, then please Accept it as the solution
Hi @Stephan_FL
You can put the following code to advanced editor
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUTIE4uJKpVgdMrmZeWBuEpBphJCFcQnLxgIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", Int64.Type}, {"Column3", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"Column1", "Column2"}, {{"Count", each _, type table [Column1=nullable text, Column2=nullable number, Column3=nullable text]}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([Count],"Index",1,1)),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Count"}),
#"Expanded Custom" = Table.ExpandTableColumn(#"Removed Columns", "Custom", {"Column3", "Index"}, {"Column3", "Index"}),
#"Filtered Rows" = Table.SelectRows(#"Expanded Custom", each ([Index] = 1))
in
#"Filtered Rows"
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Stephan_FL
Maybe try indexing.
I think this video will be able to help create a numbered index for each day. Group by the Machine ID
https://www.youtube.com/watch?v=_PBX3RPXxHw
Hope this helps
Joe
If this post helps, then please Accept it as the solution
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 August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
82 | |
77 | |
48 | |
39 |
User | Count |
---|---|
150 | |
117 | |
67 | |
64 | |
56 |