Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Filtering and counting results based on variable date

Hi everyone,   I'm currently looking to create a measure of how many courses users went on to complete on average after completing a specific course (e.g course 2 in the sample data below).    I'...
  • amitchandak's avatar
    4 years ago

    Anonymous , Create a measure like


    Measure =
    var _course = "Course 2" //selectedvalues(Course[Course]) //use independent course table in slicer
    var _date = maxx(filter(allselected(Table), Table[ID] = max(Table[ID]) && Table[Course] =_course ), [Date])
    return
    calculate(countx(values(Table[User]), calculate(count(Table[Course]), filter(allselected(Table), Table[ID] = max(Table[ID]) && Table[Date] > _date))))