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

Top Solution Authors