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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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