+ Reply to Thread
Results 1 to 2 of 2

Add certain columns with powerquery?

  1. #1
    Registered User
    Join Date
    03-10-2022
    Location
    Denmark
    MS-Off Ver
    MS365 Version 2202 Build 16.0.14931.20116
    Posts
    14

    Add certain columns with powerquery?

    Hi

    Ive got a 3000+ row report that Im trying to consolidate.
    Right now our agents have a row per event, and I would like to make powerquery add up the events (quantity/column I in the example) if 2 conditions are met:
    Condition 1: has to be the same agent ID
    Condition 2: has to be the same absence ID

    Ive attached an example of what it looks like now, after transforming the data in powerquery, and what I would like it to look like at the end. The end goal is a 2nd sheet where I use xlookup's to find the specific agents total paid sick days, vacation hours or other absence codes we use, according to this report and another report, to see if theres a difference.

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    09-18-2023
    Location
    Geogia, USA
    MS-Off Ver
    365
    Posts
    132

    Re: Add certain columns with powerquery?

    How does the initial 3000+ rows get into Excel? Are you importing a delimited text file?

    There are a few ways you can do this,
    If the data is imported directly into Excel via External data link to a table, then using an Excel Pivot table. might work for you.
    https://support.microsoft.com/en-us/...c-c84a5a340725

    See the attached, I'm not super experienced with them (as you can see by the one, I created) you should be able to get the pivot table formatted how you want it.

    If the data is manually imported via a text file, it is possible to use an SQL type query to pull the data in using sum and grouping by reading the external data source without the need for intermediate steps in Excel.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] PowerQuery - How to split row datas into separate columns
    By jeriss in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-09-2022, 05:25 AM
  2. [SOLVED] Help with Powerquery/other ways to Split filter data into specific columns
    By chandramouliarun in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2022, 08:24 AM
  3. [SOLVED] Dynamic reorder of columns in PowerQuery
    By afgi in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 12-29-2020, 02:56 AM
  4. [SOLVED] PowerQuery index match prioritized criteria from 2 columns
    By Imbizile in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 06-28-2020, 01:00 PM
  5. PowerQuery custom columns with formulas
    By lordneeko in forum Excel General
    Replies: 7
    Last Post: 05-17-2019, 03:51 PM
  6. PowerQuery: Expand all columns after table join
    By Barslund in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2018, 04:59 AM
  7. Avoid PowerQuery refresh from deleting empty columns
    By Barslund in forum Excel General
    Replies: 10
    Last Post: 01-10-2018, 04:19 AM

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