Excel PQ
Excel PQ
(1) Split text, (2) Cell formats - General vs. Text vs. Date ***; (3) Rectify
5 Text to Columns 67-70
22.07.2018 ~ dmy and 20180722 is ~ ymd
LEFT (first n characters), RIGHT (last n characters), MID (n characters
6 Extract characters 71
from a certain starting point)
7 “Cleanse” TRIM (Yoda Pvt Ltd > Yoda Pvt Ltd), VALUE (Nos. stored as text > No.) 60
8 Check/Validate LEN (Yoda = 4), SEARCH (start position no. in a cell) 60
(B) LOOKUPS
(1) Lookup value in 1st column of table array, (2) F4 and comma, (3)
9 VLOOKUP “tantrums” 50
Format = Nos. stored as text vs. General/Number -> Use T2C ***
10 VLOOKUP with TRUE / 1 3 conditions – [Slabs] in [>=] [Nos. in Asc. Order]; Used for [Nos./Dates] 51
13 Fuzzy Lookup (MS Add-in) Ctrl + T; Matching same names with different spellings – Rajeev vs. Rajiv -
(C) AGGREGATORS & LOGICALS
14 SUMIFS / COUNTIFS SAME Heights of all Ranges, Use $ for ranges, “>=”&A1 58-59
15 Running Count =COUNTIFS($A$1:A1,A1) – Used to lookup for duplicate value 59
2 Import Data from the “Web” (e.g. AMFI India - MF NAVs – NAV.txt) + Refresh
5 Home – Merge Queries [horizontal] i.e. add more columns sideways (~VLOOKUP or INDEX)
Home – Append Queries [vertical] i.e. add more rows below (~copy paste data below)
6 Queries – “Duplicate” to create multi sub-branches, “Rename” for better identification & reference
8 Transform – Use first row as headers, Fill Down, Split Column, Replace Values, Extract*, Format* (TRIM, CLEAN, Case
Change)
14 Add Column – Column from Examples using Programming by Example or PBE (~FlashFill)
18 Right-click on Query > Load to > [Connection] + [Add this data to Data Model]
>>> Insert Pivot Table with source as “Connection” button
19 JOIN Types in Merge Queries - e.g. [Invited vs Present in an Event] OR [Own Catalog vs Phy. Stock] OR [Popular Products vs
Out of Stock]:
20 Trick to get List of all M-Query commands: New Query > Other Sources > Blank Query > =#shared > Convert into Table
21