Forum Discussion

ZakariAK's avatar
ZakariAK
Regular Visitor
2 years ago
Solved

Calculating Continuation percentages

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 ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    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.