none
Value lookup RRS feed

  • Question

  • Dear all,

    I am looking for a query to extract last date of visit against a contact number.

    I have two tables called Daily visit report (DVR) and unique contact list (UCL). I want to extract value from DVR table to UCL related to any contact number.

    please help thanks 

    Steve

    Wednesday, December 4, 2019 10:59 AM

Answers

  • Hi,

    From UCL list:

    let
        toTable = Table.FromList(UCL, Splitter.SplitByNothing()),
        join = Table.NestedJoin(toTable,"Column1",Table.Group(DVR, "id", {"MaxDate", each List.Max([Date])}),"id","DVR"),
        expand = Table.ExpandTableColumn(join, "DVR", {"MaxDate"})
    in
        expand
    Wednesday, December 4, 2019 12:05 PM