Forum Discussion

Hoveyg's avatar
Hoveyg
Regular Visitor
9 years ago
Solved

Getting previous semester enrolment using DAX measures

Hi Everyone,   I work in the education sector and am looking to setup a PowerBI dashboard that returns the # of students based on enrolment for the previous term of the previous year. ie.  Report ‘...
  • Framet's avatar
    9 years ago

    Hi,

     

    The suggested formula is very valid. Just an additional option depending on your setup as the above will return nothing if you have anything in the report alterting the filter context on CNA_Enrolment[Term#] to anything other than 1158.

     

    Additonally you might want to try:

     

    PY_StudentCount = CALCULATE([Distinct Students], FILTER(All(CNA_Enrolment[Term#]), CNA_Enrolment[Term#] = 1158))

     

    You also mention the 1158 was added just for testing, without this what about the formula would return a prior year value?

     

    DAX is certianly able to assist in prior year and indeed many other time intelligence functions and I would agree a good book is really helpful in understanding how get to grips with things.

     

    Thanks

     

    Thomas