Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
I want percent status (retained) by gender as my y-axis and term as my x-axis.. I would prefer to drop the A (not retained) altogether from the graph. I tried concatenating gender and status and using this measure:
But it is giving me percent of total for each group. I want x% of females and x% of males were retained per semester on the graph.
I would also prefer not to use gedret at all if possible.
Sample of the data:
race | gender | age_group | degree_type | Status | term | gedret |
African-American | Male | 30 and Over | College Transfer | A | Fall 2017 | Male A |
African-American | Male | 30 and Over | Career / Technical | Retained | Fall 2017 | Male Retained |
African-American | Male | 30 and Over | College Transfer | Retained | Fall 2017 | Male Retained |
African-American | Female | 30 and Over | Career / Technical | Retained | Fall 2017 | Female Retained |
African-American | Male | 30 and Over | Career / Technical | Retained | Fall 2017 | Male Retained |
African-American | Male | 30 and Over | Career / Technical | A | Fall 2017 | Male A |
African-American | Female | 30 and Over | College Transfer | Retained | Fall 2017 | Female Retained |
African-American | Female | 30 and Over | College Transfer | Retained | Fall 2017 | Female Retained |
African-American | Male | 30 and Over | Career / Technical | A | Fall 2017 | Male A |
African-American | Female | 30 and Over | Career / Technical | Retained | Fall 2017 | Female Retained |
African-American | Male | 30 and Over | Career / Technical | A | Fall 2017 | Male A |
White | Female | 18-24 | College Transfer | Retained | Fall 2017 | Female Retained |
White | Female | 30 and Over | College Transfer | Retained | Fall 2017 | Female Retained |
White | Female | 18-24 | College Transfer | Retained | Fall 2017 | Female Retained |
African-American | Male | 30 and Over | Career / Technical | A | Fall 2017 | Male A |
White | Male | 30 and Over | Career / Technical | A | Fall 2017 | Male A |
African-American | Female | 30 and Over | Career / Technical | Retained | Fall 2017 | Female Retained |
White | Female | 30 and Over | Career / Technical | A | Fall 2017 | Female A |
Solved! Go to Solution.
Hi,
These measures work
Members = COUNTROWS(Data)
Retained = CALCULATE([Members],Data[Status]="retained")
Retention rate = DIVIDE([Retained],[Members])
Hope this helps,
Hi,
Based on the sample data that you have shared, show the expected result.
Thank you for the reply.
Using variables gender and status I would like the result:
Male : retained = 33% A= 67%
Female :retained= 89% A= 11%
I cannot understand your expected result. Someone who does will help you.
gender | Status | |
Male | A | |
Male | Retained | |
Male | Retained | |
Female | Retained | |
Male | Retained | |
Male | A | |
Female | Retained | |
Female | Retained | |
Male | A | |
Female | Retained | |
Male | A | |
Female | Retained | |
Female | Retained | |
Female | Retained | |
Male | A | |
Male | A | |
Female | Retained | |
Female | A |
percentage = DIVIDE(COUNTA('retentionF17F23(2)'[Status]),CALCULATE(COUNTA('retentionF17F23(2)'[Status]),all('retentionF17F23(2)'[Status])))
By using the measure above I can get overall retention rates. I want to further disagregate it by gender as well.
In the sample data there are 9 males and 9 females. Of the 9 males 3 were retained =33%
of the 9 females 8 were retained 89%. Hopefully that makes it easier to understand for everyone.
Hi,
These measures work
Members = COUNTROWS(Data)
Retained = CALCULATE([Members],Data[Status]="retained")
Retention rate = DIVIDE([Retained],[Members])
Hope this helps,
Worked perfect. Thank you! Anyone know of any free resources for Power BI training?
I have been able to get to the chart below using this measure:
But I need it to look like this:
I achieved this by dividing the (retention percentage by gender) by number of students and using sum but then it will not work with slicers.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
110 | |
95 | |
86 | |
78 | |
66 |
User | Count |
---|---|
157 | |
125 | |
116 | |
111 | |
95 |