Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
phantomias33
New Member

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
1 ACCEPTED SOLUTION

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
phantomias33
New Member

Thank you, Thank you!  

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.

 

image001.png

 

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

 

image002.png

 

 

 

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.