Results 1 to 1 of 1

Power Query Multiplying Aggregated field

Threaded View

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

    Power Query Multiplying Aggregated field

    Hi,
    Workbook both examples attached.

    I have added the summed values of one table into another and multiplied by a value in that table ;

     Table.AddColumn(Source, "Revenue", each
                              List.Sum( 
                      Table.SelectRows( #"Sales Table", (A)=> A[Item] = _ [Item] ) [Sales]
                                           )  
                                *[Price] )
    And I've been trying to do, but using 'Merge', and then the Aggregate option from expand,; I can use List count and then change to sum,

       Table.AggregateTableColumn(#"Merged Queries", "Sales Table", {{"Sales", List.Sum ,    "Sum of Sales"}})
    This gives me the sum of sales for each category, two things, I can then time this by 'price' column, two things can I is it possible to muliply by 'price' at this stage as in the first example, and is there a way to add data type within each aggregation?

    I looked at MS docs and all I can see is a feature 'type table', is this the only way?


    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. Field name change in Power Query
    By Eric Tsang in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-17-2022, 09:09 AM
  2. [SOLVED] Power Query extraction of field in duplicated record
    By Stefj in forum Excel General
    Replies: 3
    Last Post: 05-11-2020, 08:40 PM
  3. Replies: 4
    Last Post: 02-17-2020, 06:03 AM
  4. Replies: 3
    Last Post: 11-06-2019, 10:45 AM
  5. [SOLVED] Store Power Query table and add calculated field
    By jaryszek in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-01-2019, 08:18 AM
  6. Power Query: Check if Field contains text from list
    By learning new things in forum Excel General
    Replies: 0
    Last Post: 11-07-2018, 03:33 PM
  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