Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Help me please:
Name | 19-20 maths | 19-20 french | 20-21 math | 20-21 french | 21-22 math | 21-22 french |
John | 85 | 76 | 68 | 84 | 54 | 45 |
Bob | 75 | 87 | 74 | 80 | 76 | 85 |
Roger | 55 | 92 | 68 | 90 | 75 | 88 |
This is the data I have right now.
I want to be able to show in a line graph the year progression of a selected subject for a specific student selected with a filter.
Exemple of the X axis wanted : 19-20 math, 20-21 math, 21-22 math.
Example of Y axis wanted : result 1 to 100.
I am a pBI beginner.
Thanks.
Solved! Go to Solution.
You will want to change your table structure a bit! In the Power Query Editor click the transform tab and select your Name column. Next, select the unpivot columns dropdown > click 'Unpivot other columns'
Next, we can split out the year and the subject from 1 field into 2. This will help with filtering and such later (or if you wanted to see an average for the year for a student without a specific subject).
Under the transform tab, select your 'Attribute' column (this should be your year/subject). Click the split column > by number of characters and set your parameters as shown in this screenshot.
You can rename your columns to reflect what they mean. You should be left with something like this:
*side note, this data has multiple math variations.. You can find/replace with whichever math(s) you want to use in the subject column. Right click column > Replace values
Click the home tab > close and apply.
To create your line graph as detailed in your post. Click the line chart, add in your year and subject to the x-axis. Grade in the y-axis, and create filters for your students and subjects. You should be left with something like this:
If you want to edit your axis range, click the format visual button (in the visualizations pane) > expand y-axis > set your min and max to 1 and 100. You'll have your final graph!
Mark this post as a solution if it helps and reply to this if you have further questions!
You will want to change your table structure a bit! In the Power Query Editor click the transform tab and select your Name column. Next, select the unpivot columns dropdown > click 'Unpivot other columns'
Next, we can split out the year and the subject from 1 field into 2. This will help with filtering and such later (or if you wanted to see an average for the year for a student without a specific subject).
Under the transform tab, select your 'Attribute' column (this should be your year/subject). Click the split column > by number of characters and set your parameters as shown in this screenshot.
You can rename your columns to reflect what they mean. You should be left with something like this:
*side note, this data has multiple math variations.. You can find/replace with whichever math(s) you want to use in the subject column. Right click column > Replace values
Click the home tab > close and apply.
To create your line graph as detailed in your post. Click the line chart, add in your year and subject to the x-axis. Grade in the y-axis, and create filters for your students and subjects. You should be left with something like this:
If you want to edit your axis range, click the format visual button (in the visualizations pane) > expand y-axis > set your min and max to 1 and 100. You'll have your final graph!
Mark this post as a solution if it helps and reply to this if you have further questions!
Thanks, it works perfectly, very easy to understand.
So simple yet I was so far of achieving it.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
112 | |
105 | |
98 | |
39 | |
30 |