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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
RodolfoGalit
Frequent Visitor

Line Chart (Last 12 weeks Trend)

Hi Experts, I am new to Power BI couldn't create a line chart in BI like I did in excel (see screenshot below ) which very simple from the data table i have also attach below. The data is based on the recorded % from the last 12 weeks. 'appreaciate all your help.. Thank you in advance!

 

RodolfoGalit_1-1664398334347.png

 

RodolfoGalit_0-1664398322843.png

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, you should select the first column and "Unpivot Other columns".  Rename the Attribute column to Date.  Create a Calendar Table with a relationship (Many to One and Single) from the Date column of the Data Table to the Date column of the Calendar Table.  To the X-axis, drag Date column from the Calendar Table.  Write this measure and drag it to your visual

Measure - sum(Data[Value])

Hope this helps..


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

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, you should select the first column and "Unpivot Other columns".  Rename the Attribute column to Date.  Create a Calendar Table with a relationship (Many to One and Single) from the Date column of the Data Table to the Date column of the Calendar Table.  To the X-axis, drag Date column from the Calendar Table.  Write this measure and drag it to your visual

Measure - sum(Data[Value])

Hope this helps..


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

Try moving the Weeks into the X-Axis and the Service Center into the Y-Axis field. 

How to expand? yours has X&Y, mine is just Axis

 

RodolfoGalit_0-1664402055142.png

 

Alta88
Helper IV
Helper IV

Try importing the Excel file directly into Power BI per the following:

 

Alta88_0-1664399660161.png

 

Once imported, you'll then go to the Visualizations pane and select the Line Chart icon:

Alta88_1-1664399765172.png

 

A blank chart will appear and the Visualizations pane will display the following fiels: 

Alta88_2-1664399828131.png

 

Take the fields imported from your Excel file and drop them into the respective Axes. 

 

As you drop them in, the chart will begin visualizing the data and you can edit the fields to your liking. 

 

Not the way I wanted, the Weeks count should be in X-axis not the Service Centers. How will I switch that

RodolfoGalit_1-1664401300603.png

RodolfoGalit_2-1664401330615.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.