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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply

Help with data for a line chart

Hi this is school related. I have attendance data that comes in weeks column by column.

example below. The first column is the student, the following columns are the weeks showing the percentage of attendance for that week.

 

studentweek 1week 2week 3
a995699
b998999
c9799100

 

I want a line graph or bar chart it to show week as the X and percentage as the Y. The year groups will be the legend showing the average attendance of each year group per week. I havew this data linked in off another table. 

I'm working in the idea i need to change the layout as follows

 

weekstudentattendance
1a99
1b98
1c78
2a98
2b90
2c89
3a100

 

I can't change how it comes out of the database/MIS. I need to change it in BI

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jblackburnHWGA , Unpivot week columns in power query

 

https://radacad.com/pivot-and-unpivot-with-power-bi

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2

That was quick. I couldn't figure out what i was looking for. I didn't know you could pivot select columns. Something new learnt

amitchandak
Super User
Super User

@jblackburnHWGA , Unpivot week columns in power query

 

https://radacad.com/pivot-and-unpivot-with-power-bi

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors