Results 1 to 3 of 3

Power Query using Table.TranformColumns

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    777

    Power Query using Table.TranformColumns

    Hi,

    I have a query, and it's working but I'd like to incorporate the 'expand' end part into the code,
    but I need to use Text.Combine and first transform the values into text from numbers and I can't figure out where to place it.


    This is the code ;

    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        #"Grouped Rows" = Table.Group(Source, {"Item"}, {{"Count", each _, type table [Item=text, Units=number]}}),
        a = #"Grouped Rows"{[Item="a"]}[Count],
        #"Added Index" = Table.AddIndexColumn(a, "Index", 1, 1, Int64.Type),
        #"Added Custom" = Table.AddColumn(#"Added Index", "Custom", (A)=> Table.SelectRows( #"Added Index" , (B)=> B[Index] = A[Index] -1 ) [Units]  ),
        #"Extracted Values" = Table.TransformColumns(#"Added Custom", {"Custom", each Text.Combine(List.Transform(_, Text.From)), type text})
    in
        #"Extracted Values"
    And I'd like to nest the last part 'extract' into it rather than just using expand columns. I've then used this as a funtion to work on all the groups.
    I've attached a workbook show stages and finished example.

    Richard
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Power Query - load to workbook and create query table
    By jaryszek in forum Excel General
    Replies: 1
    Last Post: 12-10-2019, 11:09 AM
  2. [SOLVED] Power Pivot/Query Convert Existing Table to Query
    By trisoldee in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-23-2019, 04:27 PM
  3. POWER Query and Power Pivot Table !!
    By haitham.shop in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-06-2018, 04:09 PM
  4. Power Query and Power Pivot Table
    By haitham.shop in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-06-2018, 06:17 AM
  5. Power Query and Power Pivot Table !!
    By haitham.shop in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-06-2018, 06:15 AM
  6. POWER Query and Power Pivot Table !!
    By haitham.shop in forum Access Tables & Databases
    Replies: 0
    Last Post: 08-06-2018, 05:59 AM
  7. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1