Skip to content

Latest commit

 

History

History
34 lines (30 loc) · 1.26 KB

File metadata and controls

34 lines (30 loc) · 1.26 KB

Common Tool for Power Query

fn_Dependency_Chain.pq

Description

This function generates dependency path for a given node by searching with given dependency information

Input Parameters:

  • dependencies - Table with two columns source_id and target_id
  • separator - A string to concatenate the nodes
  • startList - The list of string to be searched as starting points to find its dependencies

  • Return:
    A List of String formed by concatenation of dependent nodes separated by /

    Example

    dependencies :

    source_idtarget_id
    AB
    BC
    DC
    ED
    CF

    Invocation: fn_Dependency_Chain(dependencies, "/", {"F"}) Output:

    list
    A/B/C/F
    E/D/C/F

    You may refer to this example Excel workbook: fn_Dependency_Chain.xlsx

    License

    License: MIT