+ Reply to Thread
Results 1 to 8 of 8

Power Query - Data enrichment ibased on existing information

  1. #1
    Forum Contributor
    Join Date
    07-08-2014
    Location
    israel
    MS-Off Ver
    office 365
    Posts
    101

    Power Query - Data enrichment ibased on existing information

    Hey

    I want to complete missing information in some of the rows in my data table

    For example i want to add information to the empty channel field according to the information that exists in the data in other rows
    In this example for source=Src_O and C_Name=C_nm4 there is a value for Channel in some of the rows (Cnl_3) PQ1.png

    I'm sure it should be simple and the logic is clear just can't seem to implement it

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,906

    Re: Power Query - Data enrichment ibased on existing information

    In PQ, sort by Name ascending, then select the C-name field and go to Transform > Fill UP.
    Attached Files Attached Files
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    07-08-2014
    Location
    israel
    MS-Off Ver
    office 365
    Posts
    101

    Re: Power Query - Data enrichment ibased on existing information

    Thanks

    I hope I correctly defined the desired result

    The goal is to complete empty values in the Channel field if the information exist for the same source and also for the same C_Name

    For example for source=Src_T and C_Name=C_nm2 the empty rows should have the value Cnl_3

    additional help that I didn't ask before
    How do I change the value of source for rows where C_Name contains a certain string?
    For example, any C_Name that contains "nmNew", the corresponding source will change to Src_G no matter what the original value was

    Thanks in advance

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,906

    Re: Power Query - Data enrichment ibased on existing information

    The goal is to complete empty values in the Channel field if the information exist for the same source and also for the same C_Name
    That's EXACTLY what I did. You do it in the query editor - just follow my instructions, but do it for the Channel column.

  5. #5
    Forum Contributor
    Join Date
    07-08-2014
    Location
    israel
    MS-Off Ver
    office 365
    Posts
    101

    Re: Power Query - Data enrichment ibased on existing information

    Sorry again, maybe I didn't clarify correctly, but it is required to complete the values in the empty cells in Channel according to the 2 fields - source and C_Name together

    For example, the empty values when source=Src_O and C_Name=C_nm5 should be Cnl_1 and not Cnl_3 as in the solution you proposed

    I would also appreciate additional help that I didn't ask before
    How do I change the value of source for rows where C_Name contains a certain string?
    For example, any C_Name that contains "nmNew", the corresponding source will change to Src_G no matter what the original value was

    Thanks in advance

  6. #6
    Forum Contributor
    Join Date
    07-08-2014
    Location
    israel
    MS-Off Ver
    office 365
    Posts
    101

    Re: Power Query - Data enrichment ibased on existing information

    Hey

    Trying my luck again

    The intention is to fill the empty cells in the Cannel column only if there is information for the value of Cannel in other rows
    with the same "Source" + "C_Name"

    If there is no unique information, leave it blank


    Later I would like for cases where there is more than one option for Cannel to choose the option where "Amount_Spent" is the highest

    I know how to do it easily in Excel and VB but I can't do it in the query

    I would really appreciate for any help how to do this
    Or where to look for an example of using query objects and functions and try to learn how to adapt it to my needs

    Thanks in advance for any ideas or starting points on how to deal with this

    I'm sure the solution is quite simple

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Power Query - Data enrichment ibased on existing information

    You have been a member for 10 years. You should be familair with the rules by now.


    Thanks for your question. However, we have just found out that you have posted the same question elsewhere.... and haven't told us. Feel free to cross-post on other sites...

    But. Every forum has its rules. Please see Forum Rule #7 about cross-posting. So.

    Do not keep it a secret. We all are willing to give you our time, freely. However, some of us get very annoyed if we waste our time developing a solution for you, when you already have a nice solution elsewhere. All we ask is that you show us some respect and tell us:

    1) if you have cross-posted, and

    2) the URL of the cross posts.

    That way, those of us who don't want to waste their time can quickly check to see if you're already happy with another solution.

    (Note: this requirement is not optional. No help to be offered until the link(s) is/are provided.)
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  8. #8
    Forum Contributor
    Join Date
    07-08-2014
    Location
    israel
    MS-Off Ver
    office 365
    Posts
    101

    Re: Power Query - Data enrichment ibased on existing information

    Thanks for bringing it to my attention
    I posted the same question on 2 other forums

    I got an answer in this forum:
    https://forum.enterprisedna.co/t/pow...mation/59306/7

    Thank you

+ 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: Add a new query to an existing Query that already has multiple queries
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-06-2023, 04:33 PM
  2. Power Query - refreshing data but adding to table, not replacing existing data
    By zakazano in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-05-2022, 08:49 AM
  3. Replies: 14
    Last Post: 01-11-2022, 10:55 AM
  4. Power Query Data Type Information
    By onedevilsstreet in forum Excel General
    Replies: 2
    Last Post: 09-28-2021, 06:48 AM
  5. [SOLVED] Blank cells in Power Query, data existing in original source
    By kirootsouthpark in forum Excel General
    Replies: 4
    Last Post: 08-25-2020, 05:05 PM
  6. [SOLVED] Adding/Updating Data to an existing Power Query
    By LisaWilliams231 in forum Excel General
    Replies: 5
    Last Post: 05-03-2020, 12:41 PM
  7. [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

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