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

Months across top as separate columns - Line Chart

Does anyone know a simple way to create a line chart with billed dates on the x axis and amount billed on the y axis with each client as a separate line when the table has the month billed as separate columns across the top, as below?

 

Name1/1/202/1/203/1/20

Client A

5,0006,0007,000
Client B5,0006,0007,000
Client C5,0006,0007,000

 

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @tsachse 

In Edit queries, select "Name" column, then "Tranform"->"Unpivot other columns",

we would have a column named "Atrribute" and another column named "Value", please rename the "Attribute" as "date", then close&&apply.

Create line charts as below

 

create a date table
Date table = CALENDARAUTO()

create relationships between "date table" and "table" based on [date] column

 

Capture7.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @tsachse 

In Edit queries, select "Name" column, then "Tranform"->"Unpivot other columns",

we would have a column named "Atrribute" and another column named "Value", please rename the "Attribute" as "date", then close&&apply.

Create line charts as below

 

create a date table
Date table = CALENDARAUTO()

create relationships between "date table" and "table" based on [date] column

 

Capture7.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Super User
Super User

If you unpivot your month columns, this is trivial. Client in Legend, Month in x-axis (Axis), Value in y-axis (Values)


@ 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...

Hi Greg, the data is not pivoted.  The raw data is in a spreadsheet maintained by our billing person who updates the amounts for each client monthly before sending out invoices.  The columns with the billing amounts run from January 2013 to the current month.  Thanks!

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.