The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I have a table with student registries from different years, i already have the counts by the ID column, but I want to calculate the percentage of students from each studies in each academic years that continue their studies in the next year.
Thanks in advance,
Solved! Go to Solution.
Hi @ZakariAK ,
I create a table as you mentioned.
Then I create a calculated column named Percentage.
Percentage =
VAR _Total =
COUNT ( Students[ID] )
VAR _Continue =
CALCULATE (
COUNT ( Students[ID] ),
FILTER (
ALL ( Students ),
'Students'[Study Area] = EARLIER ( Students[Study Area] )
&& 'Students'[Academic Year] = EARLIER ( Students[Academic Year] )
)
)
RETURN
DIVIDE ( _Continue, _Total, 0 )
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ZakariAK ,
I create a table as you mentioned.
Then I create a calculated column named Percentage.
Percentage =
VAR _Total =
COUNT ( Students[ID] )
VAR _Continue =
CALCULATE (
COUNT ( Students[ID] ),
FILTER (
ALL ( Students ),
'Students'[Study Area] = EARLIER ( Students[Study Area] )
&& 'Students'[Academic Year] = EARLIER ( Students[Academic Year] )
)
)
RETURN
DIVIDE ( _Continue, _Total, 0 )
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@ZakariAK ,You can create a measure for continuing students
Total Students = COUNT('YourTable'[Student ID])
Continuing Students =
CALCULATE(
COUNT('YourTable'[Student ID]),
FILTER(
ALL('YourTable'),
'YourTable'[Academic Year] = EARLIER('YourTable'[Academic Year]) + 1
&& 'YourTable'[Study] = EARLIER('YourTable'[Study])
)
)
Create a new measure to calculate the percentage of students who continue their studies:
Percentage Continuing = DIVIDE([Continuing Students], [Total Students]) * 100
This will display the academic year, study, total number of students, number of students continuing their studies in the next year, and the percentage of students continuing for each combination of academic year and study
Proud to be a Super User! |
|
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |