Forum Discussion

DSR's avatar
DSR
Resolver I
3 years ago
Solved

Extract all Values, INCLUDING DUPLICATES, from two columns having nested Lists, in Power query

Please,

Thanks

  • Dear v-jingzhang,

    1- Thank you for your help.

    2- Kindly note Applying: 

    let pFillers = [Fillers] in List.Sort(List.Select([Current EE], each List.Contains(pFillers, _)))

     without specifying the current Record, It gave error, but specifying the record it Works, like this:

    let pFillers = _[Fillers] in List.Sort(List.Select(_[CurrentEE], each List.Contains(pFillers, _)))).

    3- Please help me understand the condition "each List.Contains(pFillers, _)" and the underscore you used in your "List.Contains(pFillers, _) refer to what Field?

     

    4- May you explain why: "each List.Select((_[CurrentEE]), each List.Contains (_[CurrentEE], (_[Fillers])))" did not work?

    Thank you

    DSR

3 Replies

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi DSR 

     

    You can add a custom column with this code

    let pFillers = [Fillers] in List.Sort(List.Select([Current EE], each List.Contains(pFillers, _)))

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

  • DSR's avatar
    DSR
    Resolver I

    Dear v-jingzhang,

    1- Thank you for your help.

    2- Kindly note Applying: 

    let pFillers = [Fillers] in List.Sort(List.Select([Current EE], each List.Contains(pFillers, _)))

     without specifying the current Record, It gave error, but specifying the record it Works, like this:

    let pFillers = _[Fillers] in List.Sort(List.Select(_[CurrentEE], each List.Contains(pFillers, _)))).

    3- Please help me understand the condition "each List.Contains(pFillers, _)" and the underscore you used in your "List.Contains(pFillers, _) refer to what Field?

     

    4- May you explain why: "each List.Select((_[CurrentEE]), each List.Contains (_[CurrentEE], (_[Fillers])))" did not work?

    Thank you

    DSR