+ Reply to Thread
Results 1 to 8 of 8

Combining sets of attributes

  1. #1
    Registered User
    Join Date
    11-09-2022
    Location
    Bucharest
    MS-Off Ver
    Office 365
    Posts
    5

    Combining sets of attributes

    Hello there,
    I have a small issue combining different sets of attributes.
    To be more precisely, I have a table with different movie title let's say, and each movie have 2 genre types:

    Movie title Genre 1 Genre 2
    Movie 1 Action Adventure
    Movie 2 Crime Action
    Movie 3 Action Adventure
    Movie 4 SF Drama
    Movie 5 Comedy Romance
    Movie 6 Romance Drama
    Movie 7 Drama Crime
    Movie 8 SF Adventure
    Movie 9 SF Action
    Movie 10 Comedy SF

    What I would like to create is a pivot table in which to sort by genre (column 2 + column 3) and show all movies of that genre, as bellow:

    Genre
    Action Movie 1
    Movie 2
    Movie 3
    Movie 9
    Adventure Movie 1
    Movie 3
    Movie 8
    Crime Movie 2
    Movie 7
    Comedy Movie 5
    Movie 10
    Drama Movie 4
    Movie 6
    Movie 7
    Romance Movie 5
    Movie 6
    SF Movie 4
    Movie 8
    Movie 9
    Movie 10


    Version of Excel used:

    Microsoft? Excel? for Microsoft 365 MSO (Version 2208 Build 16.0.15601.20660) 32-bit

    Thank you in advance

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Combining sets of attributes

    This proposal employs Get & Transform (Power Query) found on the Data tab.
    1. Convert the range of raw data into an Excel table (columns A:B)
    2. Use the following Power Query code to produce the green/white table (columns D:E):
    Please Login or Register  to view this content.
    3. Produce the pivot table from the green/white table
    Note for future reference, please upload an .xlsx file so that contributors do not have to recreate your data.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    11-09-2022
    Location
    Bucharest
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Combining sets of attributes

    I wonder if there's something that can be automated. If For example I add another row, I have to regenerate the green/white table again

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Combining sets of attributes

    Should not need to regenerate the green white table.
    When you add a row to the Excel table (blue/white), select a cell in the pivot table and then select Refresh (twice).
    Let us know if you have any questions.
    Attached Files Attached Files

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Combining sets of attributes

    you can use external data source and then there is no need to load the query table to the sheet, only once you get the pivot table

  6. #6
    Registered User
    Join Date
    11-09-2022
    Location
    Bucharest
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Combining sets of attributes

    Sorry for the late reply. And thank you for the proposal. I didn't just solved an issue, but learned about something that I didn't know existed. So now I have to go deeper into Power Query, and for this I need to thank you

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Combining sets of attributes

    who did you write the last post to?

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Combining sets of attributes

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. Combining different sets of data
    By mangabootoo in forum Excel General
    Replies: 1
    Last Post: 03-23-2022, 10:45 AM
  2. Combining two sets of data
    By Janispetke10 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-19-2021, 02:02 PM
  3. Combining 2 sets of tables
    By Shmueld in forum Excel General
    Replies: 3
    Last Post: 08-19-2018, 09:21 AM
  4. Combining two data sets
    By Teacher in forum Excel General
    Replies: 10
    Last Post: 09-11-2011, 12:11 PM
  5. Combining 2 sets of code
    By dalewms2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-09-2011, 07:16 PM
  6. combining two data sets
    By pani_hcu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-29-2009, 12:43 PM
  7. Combining two sets of data
    By chrmlr2 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-28-2009, 09:41 PM

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