Forum Discussion

SimonKragh's avatar
SimonKragh
Frequent Visitor
10 years ago
Solved

Stuck with "nested" records

Hi,   I have been trying to develop an interactive dashboard to visualise performance for overwatch players, however i have gone stuck. Firstly i created a hero dimension with the basical stats in...
  • v-ljerr-msft's avatar
    v-ljerr-msft
    10 years ago

    SimonKragh


     

    The appove code gives me the record which contains a record. Do you have any suggestiosn how i can access the nested record directly from the above query?


    Please try the formula below.

    let getOWHeroesStats = (charString as text) =>
    let Source = Json.Document(Web.Contents("https://api.lootbox.eu/pc/eu/donatellow-2669/competitive-play/hero/"& charString & "/")),
    Hero = Record.FieldOrDefault(Source, charString),
    #"Converted to Table" = Record.ToTable(Hero),
    #"Transposed Table" = Table.Transpose(#"Converted to Table"),
    #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table")

    in #"Promoted Headers"
    in getOWHeroesStats

    Following is the result for hero "Tracer".

     

    Regards