Forum Discussion
Custom Column Selection with Multiple Criteria
- 2 years ago
Simply add the List of fixed names to your Selection:
= List.Select(Table.ColumnNames(#"Promoted Headers"), each Text.StartsWith(_,"20")) & {"Territory","Customer","etc"} in
I might be wrong but I believe relationsships only exist in the data model that is created in Excel or Power BI after you run your queries.
I also cannot find much about relationsships in the Power Query (M) documentation.
So I think the most efficient thing you can do is to merge the columns that you need ("Territory Code", "Customer Number") from the DIM tables (which are variables/queries in Power Query at this point) into the query where you are doing your "each if" operation in the custom column. This should not be too computing extensive and is propably faster than any custom function (i.e. loading the tables from the other queries into each row and then filtering down or something like that).