Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I want to create a new table or rearrange the current data to a different structure. I am having to construct way too many measures and if I can rebuild the structure of the data in Power query, it will make what Im trying to complete easier, and I can scale it easier too.
I have no problem searching for the right video/blog post, etc. I just don't know the key words for what I am wanting to do.
Background: My data source is an exported CSV/Excel file that is a gradebook from a course with test grades, quiz grades, notes grades, etc. It currently exports like this:
StudentId Unit 1 Quiz Unit 1 Homework Unit 1 Test Unit 2 Quiz Unit 2 Homework Unit 2 Test
88888 85 82 93 85 100 95
88887 81 92 83 95 100 84
88886 89 72 97 82 100 82
In my current setup (above) , I have 4 fields for every unit (Prerequisite, Quiz, Homework, Test) and I have to write a measure for each field. Each unit = 4 measures. In my test course, I have 12 units total, so that is 48 measures for 1 course! Each course is repeated 6 times and I have 8 different courses, so that is A LOT of measures.
I want it to look like this:
StudentId Quiz Name Quiz Score Test Name Test Score Homework Name Homework Score
88888 Unit 1 Quiz 82 Unit 1 Test 93 85 100
88887 Unit 1 Quiz 81 Unit 1 Test 83 95 100
88886 Unit 1 Quiz 89 Unit 1 Test 97 82 100
88888 Unit 2 Quiz 85 Unit 2 Test 95 85 100
88887 Unit 2 Quiz 95 Unit 2 Test 84 95 100
88886 Unit 2 Quiz 82 Unit 2 Test 82 82 100
Solved! Go to Solution.
@jaw19883 , Please check this blog, seem like that should help help
https://kohera.be/power-bi/how-to-unpivot-twice/
@amitchandak This appears to have worked! Thank you for your quick and correct response! This is going to transform the design in this project.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 103 | |
| 81 | |
| 65 | |
| 50 | |
| 45 |