Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have recently starting using Power BI in my school to analyse data. One thing I am trying to user it to replace is showing differences between types of students on certain KPI's
For example I have a table that shows male and female showing various KPI's and I want to create a difference column at the end
The KPI's are calculated measures.
KPI | Male | Female | Difference |
%4+Ebacc | 45.56% | 68.83% | -23.37% |
%5+Ebacc | 23.33% | 46.75% | -23.42% |
I also want to be able to change the student type so that one table might show gender, another Special Education Needs types, another ethnicity etc.
Any help for a complete Power BI beginner will be appreciated.
Solved! Go to Solution.
Hi @jonlloyd ,
Based on your description, you want to calculate a new measure based on KPI. You can learn about the basic features of DAX, as well as the "DIVIDE" function and the "VAR" function.
You can refer to this sample of DAX:
Measure =
var sum_stu = MAX('Table'[Column1])+MAX('Table'[Column2])
var cur_count = MAX('Table'[Column1])
return DIVIDE(cur_count,sum_stu)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you for the info, but I can't get the formula to work. Do I need to replace the 'Table' [column1] part with my own data tables?
On my data tables the information for column 1 and 2 is stored in the same column in my data table so does that make a difference?
sorry for my stupidity I'm still trying to figure out DAX formulas.
Hi @jonlloyd ,
The formula I gave you is just a sample. You need to use your own table and column names. Or you can provide your sample data and expected result. So we can help you solve the problem more effectively
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Unfortunately, I can't provide an example of my data as its all live student data with too much personal information on it to share. Is there anything else I can provide you that maybe of use to help me with my problem?
The KPI's are all calculated measures, and the gender of the student is in the same column with a row for each student in the table but is acting as a filter on a matrix table. I want the difference value to appear as an additional column Hopefully the screenshot below may help
Should just have to create a measure like:
Difference = [Measure1] - [Measure2]
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 |
---|---|
113 | |
109 | |
101 | |
39 | |
31 |