Forum Discussion

phantomias33's avatar
phantomias33
Regular Visitor
2 years ago
Solved

Trying to import a seemingly simple excel sheet.

While this seems straight-forward, I'm getting tripped up.  Below is data from Excel that shows a management team and their projected Headcount needs for the rest of the year.  (Between the Youtube videos and searched threads, it's obvious I need to stop thinking they way I do in Excel.)

 

What I'd like to do is show the sum total headcount (last row) forecast over time in a line chart.  What I've done so far is deleted the top row, and then transposed it.   That gets me to columns that I can work with but when deleting the top row, I've lost the time axis.  (I could change it in Excel but I don't own the file).  How can I either transform the data below to maintain the remaining months in 2024 or, is it possible to do what I've done but insert a column with time?

 

ManagerSiteMar 2024Apr 2024May 2024Jun 2024Jul 2024Aug 2024Sep 2024Oct 2024Nov 2024Dec 2024
GilbertArizona4444444444
GilbertNorth Carolina11111111111111111111
GilbertColorado3333333333
ThomasWashington2223332222
ThomasOregon5555555777
DeloresKentucky1111111111
DeloresOhio2222222222
DeloresIowa2222111111
BeaufortFlorida5555555555
BeaufortGeorgia0000000000
BeaufortAlabama10109991010101010
BeaufortTennessee2222222222
 Total47474647464746484848
  • Ashish_Mathur's avatar
    Ashish_Mathur
    2 years ago

    You have to select all columns other than the Month column and then use "Unpivot Other Columns".  Before that ensure that there are no total/subtotal rows.  Also, in the Source step itself, the headers of the table should be the ones that you posted in the first message.

5 Replies

  • Hi,

    In the Query Editor, select the first 2 columns, right click and select "Unpivot Other Columns".  Rename the attribute column as Date.  Ensure that the data types are proper.  Click on Close and Apply.  Now build your visuals/write your measures.

    • phantomias33's avatar
      phantomias33
      Regular Visitor

      Thank you!  I think you've got me just about there.   I can rename the 'Attribute' column to 'Date' but the values in there are just text (see below) and not actually the dates.  I should mention, the below is if I delete the top row from my original post.

       

       

      If I don't delete the top row from the original post, I end up with the below.

       

       

       

       

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Icon for Super User rankSuper User

        You have to select all columns other than the Month column and then use "Unpivot Other Columns".  Before that ensure that there are no total/subtotal rows.  Also, in the Source step itself, the headers of the table should be the ones that you posted in the first message.