// Home table: History Focus end year = MAX ( Cohort[Ending year] ) // Home table: History Focus cohort = VAR Y = [Focus end year] RETURN IF ( NOT ISBLANK ( Y ), FORMAT ( Y - 1, "0000" ) & "–" & FORMAT ( Y, "0000" ) ) // Home table: History NAIT cohort = VAR Y = [Focus end year] RETURN CALCULATE ( MAX ( Cohort[Published cohort size] ), FILTER ( ALL ( Cohort ), Cohort[Ending year] = Y ) ) // Home table: History Prior-year learners = VAR Y = [Focus end year] VAR Code = SELECTEDVALUE ( Institution[Code] ) RETURN IF ( NOT ISBLANK ( Code ) && Code <> "NA", CALCULATE ( MAX ( History[Published count] ), FILTER ( ALL ( Cohort ), Cohort[Ending year] = Y ), FILTER ( ALL ( Lookback ), Lookback[Years earlier] = 1 ) ) ) // Home table: History Prior cohort learners = VAR Y = [Focus end year] - 1 RETURN CALCULATE ( [Prior-year learners], FILTER ( ALL ( Cohort ), Cohort[Ending year] = Y ) ) // Home table: History Learner change = VAR CurrentN = [Prior-year learners] VAR PreviousN = [Prior cohort learners] RETURN IF ( NOT ISBLANK ( CurrentN ) && NOT ISBLANK ( PreviousN ), CurrentN - PreviousN ) // Home table: History Share of cohort = DIVIDE ( [Prior-year learners], [NAIT cohort] ) // Home table: History Share change = VAR Y = [Focus end year] - 1 VAR CurrentShare = [Share of cohort] VAR PreviousShare = CALCULATE ( [Share of cohort], FILTER ( ALL ( Cohort ), Cohort[Ending year] = Y ) ) RETURN IF ( NOT ISBLANK ( CurrentShare ) && NOT ISBLANK ( PreviousShare ), 100 * ( CurrentShare - PreviousShare ) ) // Home table: History Partner rank = VAR CurrentN = [Prior-year learners] VAR Eligible = FILTER ( ALLSELECTED ( Institution ), Institution[Code] <> "NA" && NOT ISBLANK ( [Prior-year learners] ) ) RETURN IF ( NOT ISBLANK ( CurrentN ), RANKX ( Eligible, [Prior-year learners], CurrentN, DESC, DENSE ) ) // Home table: History Partners with learners = COALESCE ( COUNTROWS ( FILTER ( VALUES ( Institution[Code] ), [Prior-year learners] > 0 ) ), 0 ) // Home table: History Partners with data = COALESCE ( COUNTROWS ( FILTER ( VALUES ( Institution[Code] ), NOT ISBLANK ( [Prior-year learners] ) ) ), 0 ) // Home table: History Profile institution = IF ( ISFILTERED ( Institution[Institution] ), SELECTEDVALUE ( Institution[Institution] ), "University of Alberta" ) // Home table: History Profile learners = VAR PartnerName = [Profile institution] RETURN IF ( NOT ISBLANK ( PartnerName ), CALCULATE ( [Prior-year learners], KEEPFILTERS ( TREATAS ( { PartnerName }, Institution[Institution] ) ) ) ) // Home table: History Profile share = VAR PartnerName = [Profile institution] RETURN IF ( NOT ISBLANK ( PartnerName ), CALCULATE ( [Share of cohort], KEEPFILTERS ( TREATAS ( { PartnerName }, Institution[Institution] ) ) ) ) // Home table: History Profile change = VAR PartnerName = [Profile institution] RETURN IF ( NOT ISBLANK ( PartnerName ), CALCULATE ( [Learner change], KEEPFILTERS ( TREATAS ( { PartnerName }, Institution[Institution] ) ) ) ) // Home table: History Learners at lookback = VAR Y = [Focus end year] VAR PartnerName = [Profile institution] RETURN IF ( HASONEVALUE ( Lookback[Years earlier] ) && NOT ISBLANK ( PartnerName ), CALCULATE ( MAX ( History[Published count] ), FILTER ( ALL ( Cohort ), Cohort[Ending year] = Y ), KEEPFILTERS ( TREATAS ( { PartnerName }, Institution[Institution] ) ), KEEPFILTERS ( Institution[Role] = "External" ) ) )