little ribbit
New Member
- Joined
- Feb 22, 2021
- Messages
- 1
- Office Version
- 2016
- Platform
- Windows
I am trying to move an excel SUMPRODUCT function into Power Query.
The function searches a column against a list of names in a table, then returns TRUE if one is found.
Code sample:
IF ( SUMPRODUCT ( ISNUMBER ( SEARCH ( Table[Column], [@[current_field]] ) ) * ROW ( $rows included in Table[Column] ) ) >0, TRUE, FALSE )
There are seven (7) columns to check for each record so I put all of the separate SUMPRODUCT functions within an OR ( ) clause.
IF ( OR ( SUMPRODUCT ( ISNUMBER ( SEARCH ( Table[Column], [@[first_field]] ) ) * ROW ( $rows included in Table[Column] ) ) >0,
SUMPRODUCT ( ISNUMBER ( SEARCH ( Table[Column], [@[second_field]] ) ) * ROW ( $rows included in Table[Column] ) ) >0,
...
SUMPRODUCT ( ISNUMBER ( SEARCH ( Table[Column], [@[seventh_field]] ) ) * ROW ( $rows included in Table[Column] ) ) >0), TRUE, FALSE )
Does Power Query have an analogous function or functionality to accomplish this task?
Background: The report collects data in Excel then links to Access for table joins and processing.
I need to see if I can move this very manual report out of Access and completely into Excel.
The function searches a column against a list of names in a table, then returns TRUE if one is found.
Code sample:
IF ( SUMPRODUCT ( ISNUMBER ( SEARCH ( Table[Column], [@[current_field]] ) ) * ROW ( $rows included in Table[Column] ) ) >0, TRUE, FALSE )
There are seven (7) columns to check for each record so I put all of the separate SUMPRODUCT functions within an OR ( ) clause.
IF ( OR ( SUMPRODUCT ( ISNUMBER ( SEARCH ( Table[Column], [@[first_field]] ) ) * ROW ( $rows included in Table[Column] ) ) >0,
SUMPRODUCT ( ISNUMBER ( SEARCH ( Table[Column], [@[second_field]] ) ) * ROW ( $rows included in Table[Column] ) ) >0,
...
SUMPRODUCT ( ISNUMBER ( SEARCH ( Table[Column], [@[seventh_field]] ) ) * ROW ( $rows included in Table[Column] ) ) >0), TRUE, FALSE )
Does Power Query have an analogous function or functionality to accomplish this task?
Background: The report collects data in Excel then links to Access for table joins and processing.
I need to see if I can move this very manual report out of Access and completely into Excel.