Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
shubri
New Member

splitting multi value column in query editor

Hi all, pretty much new here, tried searching for an aswer for this. I got query from http://api.bitcoincharts.com/v1/weighted_prices.json and it gives me a table like one in the picture. I would like column values to separate by columns keeping headers 7- 30 and 24h,

 

What did I miss, I keep getting errors when trying to unpivot/split?

image.png

 

 

 

1 ACCEPTED SOLUTION
MarcelBeug
Community Champion
Community Champion

The timestamp value can't be expanded, so I would suggest to delete it.

 

let
    Source = Json.Document(Web.Contents("http://api.bitcoincharts.com/v1/weighted_prices.json")),
    #"Converted to Table" = Record.ToTable(Source),
    #"Filtered Rows" = Table.SelectRows(#"Converted to Table", each ([Value] <> 1511644685)),
    #"Expanded Value" = Table.ExpandRecordColumn(#"Filtered Rows", "Value", {"7d", "30d", "24h"}, {"7d", "30d", "24h"})
in
    #"Expanded Value"
Specializing in Power Query Formula Language (M)

View solution in original post

1 REPLY 1
MarcelBeug
Community Champion
Community Champion

The timestamp value can't be expanded, so I would suggest to delete it.

 

let
    Source = Json.Document(Web.Contents("http://api.bitcoincharts.com/v1/weighted_prices.json")),
    #"Converted to Table" = Record.ToTable(Source),
    #"Filtered Rows" = Table.SelectRows(#"Converted to Table", each ([Value] <> 1511644685)),
    #"Expanded Value" = Table.ExpandRecordColumn(#"Filtered Rows", "Value", {"7d", "30d", "24h"}, {"7d", "30d", "24h"})
in
    #"Expanded Value"
Specializing in Power Query Formula Language (M)

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.