Hi guys,
I have the following problem; I am trying to create a calculated column that shall later be used as filter in a pivot table which shows if an employee was employed during the selected time filter (e.g. 2016). As a measure this looks works perfectly and looks like:
CurrEmpl:=CALCULATE([Count of Sales Reps],filter(dPeople,MIN(dDates[Date])<=dPeople[End Date]&&max(dDates[Date])>=dPeople[Start Date]))
However, since I can't filter for the result in a pivot table, I have to somehow replicate it as a calculated column, which is not working for me so far; here is my current attempt which is basically the same as the measure:
=calculate(COUNTROWS(dPeople),filter(dPeople,MIN(dDates[Date])<=dPeople[End Date]&&max(dDates[Date])>=dPeople[Start Date]))
This ends up returning 1s all the way, ignoring the date filter that is on the output pivot table.
Any ideas? Thanks ahead!
I have the following problem; I am trying to create a calculated column that shall later be used as filter in a pivot table which shows if an employee was employed during the selected time filter (e.g. 2016). As a measure this looks works perfectly and looks like:
CurrEmpl:=CALCULATE([Count of Sales Reps],filter(dPeople,MIN(dDates[Date])<=dPeople[End Date]&&max(dDates[Date])>=dPeople[Start Date]))
However, since I can't filter for the result in a pivot table, I have to somehow replicate it as a calculated column, which is not working for me so far; here is my current attempt which is basically the same as the measure:
=calculate(COUNTROWS(dPeople),filter(dPeople,MIN(dDates[Date])<=dPeople[End Date]&&max(dDates[Date])>=dPeople[Start Date]))
This ends up returning 1s all the way, ignoring the date filter that is on the output pivot table.
Any ideas? Thanks ahead!