+ Reply to Thread
Results 1 to 3 of 3

Rearrange data for PowerBI

  1. #1
    Registered User
    Join Date
    04-28-2022
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    1

    Rearrange data for PowerBI

    Hello,

    I have a large Excel spreadsheet with about 1250 rows and about 50 columns, so about 60,000 numbers that I now need to arrange differently for a PowerBI presentation.

    Each column represents a product. So there are 50 different products with different characteristic curves.
    The characteristic curves are determined by formulas.
    The results are arranged one below the other in the same column.
    At the top is the speed.
    Below that, the power values corresponding to the speeds.
    Below that, the torque values corresponding to the speeds.
    In the end, the result is a characteristic curve in which the speed is plotted on the X-axis.
    The power values are plotted on the Y1 axis.
    The torque values are plotted on the Y2 axis.

    The special/difficult thing is that the three axes are arranged one below the other in the table.
    This was done so that the formulas can be copied to the right to calculate the 50 different products, and so that this can be extended at any time.

    PowerBI obviously doesn't get along with this at all, so the data has to be arranged differently.

    The whole data should be arranged in 3 columns: Type, Category and Value.
    This means that my 1250 rows x 50 columns table will be arranged in 3 columns and 62,500 rows for PowerBI.

    This is exactly what I have never done before, my attempts with REFERENCE, SVERWEIS, WVERWEIS, ADDRESS, INDEX, INDIREKT, MTRANS have failed miserably so far.
    I just don't find the right approach to implement this.

    Please no discussion for the sensefulness or alternative suggestions.
    I cannot change the data source or the data usage.
    The task is fixed: Rearrange the existing array to produce the needed array of data. No more and no less, any discussion is useless, because I can't change it :-)

    Of course I can copy myself silly, but the data should still be controlled by the original table, also extended and changed.
    By the use of (any) lookup function or similar one has then only the transformation of the arrangement, which takes over then from the origin table data.

    I have attached an example file to show the whole thing in a simplified way.
    On the tab "Data" you can see the structure of the raw data.
    On the tab "Data for PowerBI" you can see the structure as it should be for PowerBI. Formulas would now have to be entered there to take the data from the "Data" tab (lookup).

    Does anyone have a good idea how to implement this?

    Thank you very much, and best regards,
    Chris
    Attached Files Attached Files

  2. #2
    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,004

    Re: Rearrange data for PowerBI

    A2:
    =IFERROR(INDEX(Data!$B$1:$G$1,,1+INT((ROWS(A$2:A2)-1)/30)),"")

    B2:
    =IF(A2="","",IF(1+MOD((ROWS(B$2:B2)-1),30)<=15,"Speed ","Power ")&A2)

    C2:
    =IF(A2="","",INDEX((Data!$B$5:$G$19,Data!$B$23:$G$37),1+MOD((ROWS(C$2:C2)-1),15),1+INT((ROWS(C$2:C2)-1)/30),1+MOD(INT((ROWS(C$2:C2)-1)/15),2)))

    ...I think... see Sheet1.
    Attached Files Attached Files
    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

  3. #3
    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,176

    Re: Rearrange data for PowerBI

    Please Login or Register  to view this content.
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Discrepancy in casting date type: PowerQuery vs PowerBI
    By immigrated4urjob in forum Excel General
    Replies: 0
    Last Post: 01-31-2022, 02:32 PM
  2. Replies: 9
    Last Post: 11-27-2021, 05:35 AM
  3. Replies: 2
    Last Post: 10-23-2021, 08:50 PM
  4. Rearrange data that come in row.
    By ea8082 in forum Office 365
    Replies: 3
    Last Post: 02-13-2020, 10:41 PM
  5. How do I put a formula in PowerBI?
    By loade in forum Excel General
    Replies: 1
    Last Post: 12-18-2019, 10:51 AM
  6. [SOLVED] Import financial data into Excel or PowerBI
    By ErkErt in forum Excel General
    Replies: 3
    Last Post: 07-19-2019, 02:04 AM
  7. Replies: 0
    Last Post: 03-15-2018, 10:27 AM

Tags for this Thread

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