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
craigrach
Regular Visitor

Area Chart Troubles

Hello,

 

I am trying to create an area chart in power BI.  Seems simple right?

 

I am working with 5 data columns in my data set.  They are titled fiscal year 2015 through fiscal year 2020.  The sum of each of these columns provides me with a unique data point that can be plotted against the y axis.  The issue is, that I don’t have another data column to use to separate the data into individual years on the X axis (2015, 2016, 2017…ect).  As a result my data points appear stacked in a straight line, one on top of the other.

 

Any ideas on how to accomplish this?  Is there a way to assign each Value column to a unique year with restructuring my source data?

 

Thanks.

4 REPLIES 4
Greg_Deckler
Super User
Super User

Try Unpivoting your data in the query editor, this will give you two columns, one with values of "Fiscal Year 2015", etc. and the other with the Value. You can still create sum measures and you should be good to go.

 

Unpivot columns is found under "Transform" tab. Select all of your columns and then hit "Unpivot Columns".


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

 

 

Well I've made it this far.  The unpivot was successful, but when I change the data above into the area chart I am looking for, all I get it a single X category when I actually want 6 (2015-2020).

https://www.dropbox.com/s/bjpdncbgvf8pqfo/Untitled1.png?dl=0

 

The above image conveys what I am trying to show, I just want to get it into one chart instead of 5.

That makes sense. But as I am applying the unpivot to each of the columns, the overall dataset keeps getting smaller.  By the time I get to the last column, I only have 8 rows left in my table that started at several thousand.

 

Thanks again.

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.