Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello
I'm completely new to Power BI and I'm wondering if I can create a measure based on values that are being shown as a % of column total. I've spent ages trying wo figure out how to do this.
My two measures are
Solved! Go to Solution.
HI @claret_mug ,
Create a Total Measure
VAR TOTAL =
CALCULATE (
[Total students],
'Table1'[Collaborative Provision Indicator] = "Non-collaborative",
Table1[Course length 1 year or less] = "No",
Table1[Programme Level] = "UG",
Table1[Course Mode(FT/PT)] = "Full-Time",
Table1[Entry Route] = "UCAS/GTTR",
Table1[Programme Year] = "One",
Table1[Residency Home EU Overseas] = "Home"
)
Create these Measures
Female % = Divide (Female Progression, Total)
Male % = Divide (Male Progression, Total)
Then create a final measure
% Change = Male% - Female%
Regards,
Harsh Nathani
please try to calculate the % by measure
female%=
VAR Female Progression = CALCULATE([Total students],'Table1'[Collaborative Provision Indicator]="Non-collaborative",Table1[Course length 1 year or less]="No",Table1[Programme Level]="UG",Table1[Course Mode(FT/PT)]="Full-Time",Table1[Entry Route]="UCAS/GTTR",Table1[Programme Year]="One",Table1[Gender]="Female",Table1[Residency Home EU Overseas]="Home")
VAR TOTAL=CALCULATE([Total students],'Table1'[Collaborative Provision Indicator]="Non-collaborative",Table1[Course length 1 year or less]="No",Table1[Programme Level]="UG",Table1[Course Mode(FT/PT)]="Full-Time",Table1[Entry Route]="UCAS/GTTR",Table1[Programme Year]="One",Table1[Residency Home EU Overseas]="Home")
RETURN DIVIDE(FEMALE PROGRESSION, TOTAL)
MALE%=
var Male Progression = CALCULATE([Total students],'Table1'[Collaborative Provision Indicator]="Non-collaborative",Table1[Course length 1 year or less]="No",Table1[Programme Level]="UG",Table1[Course Mode(FT/PT)]="Full-Time",Table1[Entry Route]="UCAS/GTTR",Table1[Programme Year]="One",Table1[Gender]="Male",Table1[Residency Home EU Overseas]="Home")
VAR TOTAL=CALCULATE([Total students],'Table1'[Collaborative Provision Indicator]="Non-collaborative",Table1[Course length 1 year or less]="No",Table1[Programme Level]="UG",Table1[Course Mode(FT/PT)]="Full-Time",Table1[Entry Route]="UCAS/GTTR",Table1[Programme Year]="One",Table1[Residency Home EU Overseas]="Home")
RETURN DIVIDE(Male PROGRESSION, TOTAL)
then create a measure : female%-male%
Proud to be a Super User!
@claret_mug , Can you share sample data and sample output in table format?
@claret_mug create another measure for the difference if I understood your question correctly and you can use this new measure in your visuals.
Difference = [Female Progression] - [Male Progression]
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k thanks so much for your reply. The problem with this is that is just gives me the number difference (598), rather than the percentage point difference which is what I need (6.4%)
Laura
HI @claret_mug ,
Create a Total Measure
VAR TOTAL =
CALCULATE (
[Total students],
'Table1'[Collaborative Provision Indicator] = "Non-collaborative",
Table1[Course length 1 year or less] = "No",
Table1[Programme Level] = "UG",
Table1[Course Mode(FT/PT)] = "Full-Time",
Table1[Entry Route] = "UCAS/GTTR",
Table1[Programme Year] = "One",
Table1[Residency Home EU Overseas] = "Home"
)
Create these Measures
Female % = Divide (Female Progression, Total)
Male % = Divide (Male Progression, Total)
Then create a final measure
% Change = Male% - Female%
Regards,
Harsh Nathani
User | Count |
---|---|
99 | |
86 | |
80 | |
76 | |
71 |
User | Count |
---|---|
112 | |
105 | |
96 | |
74 | |
66 |