Results 1 to 1 of 1

Thread: PQ - Details for selected country

  1. #1
    Sir Moderator sandy666's Avatar
    Join Date
    May 2018
    Posts
    236
    Rep Power
    7

    Cool PQ - Details for selected country

    Details for selected country

    Country Area Building permits Capital Country/region Abbreviation Name Population Persons per household Time zone(s) Country Attribute Value
    Alabama
    135,765
    Montgomery US-AL Alabama
    4,874,747
    2.55
    Central Time Zone Indiana Building permits
    18713
    California
    102,350
    US-CA California
    39,536,653
    Pacific Time Zone Capital Indianapolis
    Florida
    170,304
    Tallahassee United States Florida
    21,670,000
    2.63
    Country/region United States
    Hawaii
    28,311
    3,369
    US-HI
    1,427,538
    Hawaii-Aleutian Time Zone Population
    6666818
    Illinois
    149,998
    Illinois
    2.63
    Central Time Zone
    Indiana
    18,713
    Indianapolis United States
    6,666,818
    Nevada
    286,367
    17,952
    Carson City United States US-NV Nevada
    2.72
    Mountain Time Zone, Pacific Time Zone
    New Jersey
    22,608
    26,793
    United States US-NJ
    9,005,644
    2.73
    New York Albany US-NY New York
    Oregon
    255,026
    19,586
    United States US-OR Oregon
    4,142,776
    2.51
    Mountain Time Zone, Pacific Time Zone
    Texas Austin US-TX
    28,304,596
    2.84
    Washington
    184,827
    44,077
    Olympia Washington
    7,405,743
    2.56
    Pacific Time Zone


    Code:
    // Country
    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content]
    in
        Source
    
    // Data
    let
        Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
        UOC = Table.UnpivotOtherColumns(Source, {"Country"}, "Attribute", "Value"),
        Filter = Table.SelectRows(UOC, each [Value] <> null and [Value] <> "")
    in
        Filter
    
    // Result
    let
        Source = Table.NestedJoin(Country,{"Country"},Data,{"Country"},"Data",JoinKind.LeftOuter),
        Expand = Table.ExpandTableColumn(Source, "Data", {"Attribute", "Value"}, {"Attribute", "Value"}),
        ROC = Table.SelectColumns(Expand,{"Attribute", "Value"})
    in
        ROC
    Last edited by sandy666; 06-10-2020 at 04:32 AM.
    sandy
    I know you know but I forgot my Crystal Ball and don't know what you know also I may not remember what I did weeks, months or years ago so answer asap. Thinking doesn't hurt

Similar Threads

  1. PQ - Count selected day between dates
    By sandy666 in forum ETL PQ Tips and Tricks
    Replies: 0
    Last Post: 05-09-2020, 09:03 PM
  2. Finding Selected Criteria in AutoFilter
    By littleiitin in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 01-08-2014, 10:54 AM
  3. Macro To Print Selected Range
    By ciapul12 in forum Excel Help
    Replies: 3
    Last Post: 11-15-2013, 11:23 PM
  4. fill in cells according to selected optionbutton
    By paul_pearson in forum Excel Help
    Replies: 6
    Last Post: 09-13-2013, 10:26 AM
  5. Replies: 6
    Last Post: 05-25-2013, 07:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •