Forum Discussion

JulianaMacedo's avatar
JulianaMacedo
Helper II
4 years ago
Solved

Iterating over a list in Power Query

Hi everyone, I'm having difficults getting the results I'm willing... I have a table with a colum that is a result of invoking a function and it gives a list as a result, now I need to iterate ove...
  • Vijay_A_Verma's avatar
    4 years ago

    Use this

    = Table.AddColumn(#"Renamed Columns1", "Test", each
    let list = [column1]
    in 
    List.Transform(list, (a)=>
    if a=0 then "X6"
    else if a=1 then "X7"
    else if a=2 then "X14"
    else if a=3 then "X15"
    else if a=4 then "X22"
    else if a=5 then "X23"
    else if a=6 then "X30"
    else if a=7 then "X31"
    else "")
    )