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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.