+ Reply to Thread
Results 1 to 4 of 4

Group By Percentages in Power Query

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-10-2020
    Location
    New Zealand
    MS-Off Ver
    365 personal
    Posts
    324

    Group By Percentages in Power Query

    Hi

    Have a table where I want to show the percentage that a value of the row is of the total for a field on the row.

    The attached workbook shows clearly the final result I want from the Query.

    Thank You

    Kind Regards

    Allister
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    02-29-2024
    Location
    EGYPT - Cairo
    MS-Off Ver
    MS365
    Posts
    99

    Re: Group By Percentages in Power Query

    Hi,

    Is this what you are looking for?
    1. Loaded your table as a source in the power query.
    2. Reordered columns according to your request.
    3. 1st grouping stage is to group by Employee and sum all values.
    4. 2nd stage, is to add the sum of Total For Employee.
    5. 3rd stage, is to collect all rows, Sum By Employee By Dept.
    6. Expand Sum By Employee By Dept column (Dept., and Value).
    7. Reorder and rename columns.
    8. Add a new column to do the divide.
    9. Finally load the result to the Excel table, and adjust the cell format to %
    Attached Files Attached Files
    Last edited by MohamedGadAllah; 03-01-2024 at 04:13 AM. Reason: Adding steps
    Thank,
    Mohamed GadAllah

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,793

    Re: Group By Percentages in Power Query

    Administrative Note:

    Where you have provided a workbook solution, please also include a clear explanation of what you've done and how (including formulae/code as approriate) in the post in question (for the benefit of members unable to download attachments).

    This is about making your assistance accessible to all.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    02-29-2024
    Location
    EGYPT - Cairo
    MS-Off Ver
    MS365
    Posts
    99

    Re: Group By Percentages in Power Query

    Quote Originally Posted by AliGW View Post
    Administrative Note:

    Where you have provided a workbook solution, please also include a clear explanation of what you've done and how (including formulae/code as appropriate) in the post in question (for the benefit of members unable to download attachments).

    This is about making your assistance accessible to all.

    Thanks.
    Thanks for the advice, I will always do that from now on.

    Did I did it the right way?
    Last edited by MohamedGadAllah; 03-01-2024 at 04:14 AM.

+ 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] Power Query Group by Year Month
    By Dicken in forum Office 365
    Replies: 2
    Last Post: 01-15-2024, 11:59 AM
  2. [SOLVED] Power Query Group and select rows within group
    By Dicken in forum Office 365
    Replies: 2
    Last Post: 06-10-2023, 07:51 AM
  3. Group by in Power Query and get unique values
    By Dicken in forum Office 365
    Replies: 1
    Last Post: 08-14-2022, 10:15 AM
  4. Replies: 8
    Last Post: 05-02-2022, 02:21 PM
  5. [SOLVED] Power Query - Multiple Rankings by Single Group
    By arpod in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-12-2021, 09:37 PM
  6. [SOLVED] Power Query Group by Each Change in Column Value
    By ibuhary in forum Excel General
    Replies: 9
    Last Post: 12-15-2019, 04:41 AM
  7. Exporting Facebook group comments to Excel using Power Query?
    By trapperjohn22 in forum Excel General
    Replies: 2
    Last Post: 02-27-2016, 04:12 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