+ Reply to Thread
Results 1 to 15 of 15

Data transformation using Formula or Power Query

  1. #1
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    425

    Data transformation using Formula or Power Query

    Hi,

    I have a date set which needs to be maintained in two different layouts.
    Every week I waste a lot of time converting from one layout to the other.
    I know its possible to do it easily by Formula/Power Query

    Would request all the experts to look into this.
    Attached sheet with source and required results.

    The revisions for an item may vary from 1 to even 5
    The status in the final version should indicate status of the highest revision for that item



    Thanks in advance
    Attached Files Attached Files

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

    Re: Data transformation using Formula or Power Query

    first: don't use merged cells

  3. #3
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    425

    Re: Data transformation using Formula or Power Query

    Quote Originally Posted by sandy666 View Post
    first: don't use merged cells
    Hi sandy666,
    Thanks for your reply and noted your point
    That is the final layout.If we manage to get the data transformed in an unmerged condition also it will work.. the merging before final printing can be done later

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

    Cool Re: Data transformation using Formula or Power Query

    so take first table to PowerQuery then load into another sheet, add headers, merge cells.
    good luck

    edit:
    something like this one
    Attached Files Attached Files
    Last edited by sandy666; 11-18-2017 at 06:56 AM.

  5. #5
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    425

    Re: Data transformation using Formula or Power Query

    But its the same layout as the source
    The main challenge I face is to pivot the actual submission and actual review columns and displaying only the latest revision status

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

    Re: Data transformation using Formula or Power Query

    PowerQuery and PivotTable/PowerPivot works on columns and content (no mereged cells)
    You can load source table as connection the use it to create PivotTable. With PowerQuery you can't iuse merged cells. You can try merge cells on PowerQuery table

    like I said above: reorganize your target layout without merged cells if you want PQ or PT

  7. #7
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    425

    Re: Data transformation using Formula or Power Query

    Hi Sandy666,

    I get your point.

    Please check the modified target layout and advise if its possible to attain (even if with some slight modifications) using PQ or PT

    Thanks
    Attached Files Attached Files

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

    Re: Data transformation using Formula or Power Query

    if you add more records to the old layout your new layout increase the length
    show example with 10 records (rows) in source table then show result what you want to achieve.

    btw. every column should have header else PQ add own header
    Last edited by sandy666; 11-18-2017 at 07:32 AM.

  9. #9
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    425

    Re: Data transformation using Formula or Power Query

    Hi sandy666,

    Please find attached
    Attached Files Attached Files

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

    Re: Data transformation using Formula or Power Query

    I knew you want cut column to rows and columns.

    All what I can do is not a wishful thinking but...

    maybe someone else will give you solution with formula(s) or something
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    425

    Re: Data transformation using Formula or Power Query

    Thanks for your reply sandy666

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,197

    Re: Data transformation using Formula or Power Query

    Formula solution

    B18

    =INDEX($B$4:$B$13,MATCH($A18,$A$4:$A$13,0))

    C18

    =IFERROR(INDEX($C$4:$C$13,MATCH($A18&C$17,$A$4:$A$13&$D$4:$D$13,0)),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Copy across to F and down

    in G18

    =IFERROR(INDEX($E$4:$E$13,MATCH($A18&G$17,$A$4:$A$13&$D$4:$D$13,0)),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Copy across to J and down

    in K18

    =INDEX($F$4:$F$13,MATCH($A18,$A$4:$A$13,0)+COUNTIF($A$4:$A$13,$A18)-1)
    Attached Files Attached Files

  13. #13
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Data transformation using Formula or Power Query

    or you can use below formula in K18 and copy towards down in JohnTopley attached sheet
    =LOOKUP(2,1/(A$4:A$13=A18),F$4:F$13)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  14. #14
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    425

    Re: Data transformation using Formula or Power Query

    Thanks JohnTopley and nflsales for your replies..

    I will need a formula in Column A to get the list if unique items also..

  15. #15
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,197

    Re: Data transformation using Formula or Power Query

    Try

    =LOOKUP(2,1/(COUNTIF($A$17:D17,$A$4:$A$13)=0),$A$4:$A13)

+ 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. error in power query & power pivot
    By Baldev Kumar in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 01-03-2018, 01:34 AM
  2. Power query formula
    By orhanceliloglu in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-19-2017, 11:28 AM
  3. [SOLVED] Change data structure using Formula or Power Query ( Get & Transform)
    By chullan88 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-04-2017, 02:58 AM
  4. Power Query Formula/Syntax
    By mielkew27 in forum Excel General
    Replies: 2
    Last Post: 04-09-2017, 11:44 PM
  5. How do I get my formula to work in a power query
    By Justair07 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-22-2016, 10:34 AM
  6. Help with Power Query Custom Column Formula
    By travis.cook21 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-16-2016, 01:45 PM
  7. [SOLVED] Formula Creation with Power Query
    By Bhalbert in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-05-2016, 01:11 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