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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
David_F64
Frequent Visitor

Help with simple Line Graph

New to Power BI (Accountin, excel and sql background) and I have created a dashboard with various visulisations that work fine, however I am trying to add what I think should be a very simple line graph (at least its very simple in Excel) and am getting no where

So my Data looks like

YearYTD JulyYTD AugustYTD SeptemberYTD OctoberYTD NovemberYTD DecemberYTD JanuaryYTD FebruaryYTD MarchYTD AprilYTD MayYTD June
2019907781817932608383448594395505109955813206663227581798365719312891006200
2020833891661212465663352864163134901905684486496317225678126819133231004026
20219483319596029803437979748034756828364180873041683829794019510551691164658
20221142332251073470724478605707316898677824279134411052326116801613233581477256
2023145179302414380051380051380051380051380051380051380051380051380051380051

 and I just want a line graph one line per year. As I said, simple in Excel (even the recommended Chart gets it right without needing to juggle anything)

 

The data comes from a view I created on the database, so if I need to change the format I can

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@David_F64 

select year column and unpivot other columns in PQ

Unpivot columns (Power Query) (microsoft.com)

then you can draw line graph. 

1.PNG

 

you can sort by another column to rearrange the month orders.

Sort one column by another column in Power BI - Power BI | Microsoft Learn

 

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

@David_F64 

select year column and unpivot other columns in PQ

Unpivot columns (Power Query) (microsoft.com)

then you can draw line graph. 

1.PNG

 

you can sort by another column to rearrange the month orders.

Sort one column by another column in Power BI - Power BI | Microsoft Learn

 

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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