Forum Discussion

Andrewstg's avatar
Andrewstg
Regular Visitor
8 years ago
Solved

Using time slicer for 2 dates

So I have a time slice going off of registration end date, it gets all of the enrolled, dropped, graduated students for this date. The problem is there are students who also start in this time frame ...
  • MattAllington's avatar
    8 years ago

    When you have 2 date columns, the complexity goes up. One option is to have 2 slicers, one for start date and the other for end date (just use a drop down list for both). You need to write a dax measure to manage the filtering on both columns. Something like this would work. 

     

    Total hours = calculate([total hours],filter(table, table[start date] >=selectedvalue(table[start date]) && table[end date] <=selectedvalue(table[end date])))