Excel_PowerQuery-- spike Vlookup combined Excel_PoweQuery-- condition counting table, conditional sum

Finally, the second bomb to the Power Query, from the last PQ more Bo, has been nearly six months.

Excel_PoweQuery-- condition counting, conditional sum

PQ carried out using tabular data connection merger is a fun thing.

The first step, to prepare data

The two data tables (Sheet) to be connected in the same workbook, particular attention match fields (columns) to be consistent with the data type.

The second step, the number loaded into the PQ forms a query table

1, find the "self-form / range" in the "Data" tab of the Ribbon "acquisition and conversion" feature set.

Ps: different versions of the function button settings are different, bloggers presentations using Office365.

2, then loaded into PQ, the "type (changed type) change" procedure deleted (click foregoing ×), thus ensuring that the data type is not changed, because the data type changes may cause accidents such as a long string of digits automatically change the mode to numeric use of scientific notation.

Then turn off, turn off the option choose "reservations (save)"

3, in the same manner, the target table (1), the matching table (2), a lookup table loaded into PQ formed.

The third step is to build a combined query

1, the target table (look-up table 1) Right --merge, build a combined query.

2, the following settings dialog combined,

① to "study" for the matching condition, two tables are checking this field;

② attention needed fuzzy matching check is not used here;

③ need to select the connection mode (this thing interesting, you can try to figure out their own taste), where select (Left outer), action is only the second table according to the first table (target table) records match.

The fourth step, expand the query results

1, PQ, there is the concept of table, column, list, etc., connected over the table data will be stored as a table of (should know better understanding point of programming, but temporarily understand also wood have problems, will be used on the line).

2, the table's columns expand expand () is a multi-column, here, we do not choose the "study", because the target table already.

3, close the query, the results are uploaded to Excel.

The fifth step, look, it's the result.

Guess you like

Origin www.cnblogs.com/yzhyingcool/p/11796680.html