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
Aimeeclaird
Helper IV
Helper IV

Help replicating an Excel Line Chart in PBI

Hi, need some help using the Line Chart visual, or advice of an alternative visual that may be more effective. 

 

My data set looks like this:

 

School CodeRegionAttendance Cycle 1 ScoreAttendance Cycle 2 ScoreAttendance Cycle 3 ScoreAttendance Cycle 4 Score
BANE89%88%87%86%
BBNE89%88%87%86%
BCNE89%88%87%86%
BDNE89%88%87%86%
BENE89%88%87%86%
BATV89%88%87%86%
BBTV89%88%87%86%
BCNE89%88%87%86%
BDNE89%88%87%86%
BETV89%88%87%86%

 

Ideally I am looking to have Cycle 1, Cycle 2, Cycle 3, Cycle 4 as my X axis columns - and the average Attendance % for each column in the visual.

 

I then want to overlay to average for the NE region and the TV region as 2 seperate lines (comparing their average attendance for each cycle with the overall project averages. 

 

(I may adapt a second visual in future to compare All Project average per cycle to Individual School averages too)

 

Can anyone help please? 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Aimeeclaird ,

 

First of all you need to unpivot the Attendance columns, on the query editor select those 4 columns and choose unpivot. You will get a table with 4 columns now setup your chart in the following way:

 

  • Axis: Attendance
  • Legend: Region
  • Values: Values (Select average)

Check PBIX file attach, I have changed some values because based on your table the two lines were exactly the same.

 

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @Aimeeclaird ,

 

First of all you need to unpivot the Attendance columns, on the query editor select those 4 columns and choose unpivot. You will get a table with 4 columns now setup your chart in the following way:

 

  • Axis: Attendance
  • Legend: Region
  • Values: Values (Select average)

Check PBIX file attach, I have changed some values because based on your table the two lines were exactly the same.

 

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



jthomson
Solution Sage
Solution Sage

A line/column combo visual should be able to get you extremely close, you might need to unpivot your cycle columns to make things a bit easier but that's just one or two easy steps in the query editor

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

April Fabric Community Update

Fabric Community Update - April 2024

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

March 2024 PBI Gallery Image

Power BI Monthly Update - March 2024

Check out the March 2024 Power BI update to learn about new features.