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!View all the Fabric Data Days sessions on demand. View schedule
Hello All,
I have a table of students and their marks across subjects and tests:
I have created a matrix in PowerBI as below:
Now, I want to add a custom row in matrix that gives sum of Geometry and Algebra marks, kindly help me.
Thanks.
Solved! Go to Solution.
Hi @ONCKdata
A simple solution came into my mind :
Create a new column "Category"
Category = IF(OR(YourTable[Subject]="Geometry";YourTable[Subject]="Algebra");"Science";"Others")
Add it to the lines of your matrix and expand it to the level where it looks like that :
- Quentin
Hi @ONCKdata
A simple solution came into my mind :
Create a new column "Category"
Category = IF(OR(YourTable[Subject]="Geometry";YourTable[Subject]="Algebra");"Science";"Others")
Add it to the lines of your matrix and expand it to the level where it looks like that :
- Quentin
Hi,
Thank you very much for the reply.
Your solution solves the question I have asked, but can you tell me if there is way to mention difference of two rows?
To make a difference between two rows is very tricky and complicated, this is why I don't do it (example here : https://community.powerbi.com/t5/Desktop/How-to-calculate-difference-between-two-row-values/td-p/389...)
What I prefer to advice is to pivot / unpivot the needed rows so that they became column and can be comparable with a simple '-'
- Quentin
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!