Forum Discussion
howellchrisj
Helper I
4 years agoDirect Query Date Slicer - Generated SQL is different
I am running into a Direct Query that is taking a while to execute and pull back results when a Date slicer is utilized from the dimDate.Date field. I currently have the following data model below a...
amitchandak
Super User
4 years agohowellchrisj , With an independent date slicer , you can try measure like
Between dates =
var _max = minx(allselected(Date), Date[Date])
var _min = maxx(allselected(Date), Date[Date])
return
calculate(count(Table[Project Number]), Filter(Table,(Table[EndDate] <=_max && Table[EndDate]) >=_min ) )
howellchrisj
Helper I
4 years agoamitchandak, thank you for the suggestion and I may have to go with that approach. Ultimately, I was hoping to leave the data model alone and figure out if I am doing something wrong elsewhere since the underlying SQL generated by PBI changes between the two different fields.