Forum Discussion

mb769's avatar
mb769
Icon for Advocate I rankAdvocate I
3 years ago

Crossfilter data based on dynamic measure

 

For the staff, I calculate a 'Dynamic Age' measure, i.e. the age shown depends on the Year I am slicing (the date slicer):

 

DynamicAge = 
CALCULATE (DATEDIFF (MIN(Staff[DoB]),  MAX(Date[Date]), YEAR ))

 

This works perfectly.

 

I also categorise the staff in groups depending on their age. For this I have a measure

 

NumberOfStaffInGroup = 

CALCULATE (DISTINCTCOUNT(Staff[Staff_ID]), FILTER (Staff[DynamicAge] <= MAX (Group[max]) && [DynamicAge] >= MIN (Group[min]))
 
which gives me the following chart (NumberOfStaffInGroup on Y-axis, Group on X-axis), next to a table with all staff members:

 

Now, I want to use the interactions, so that by clicking one of those bars, my table is sliced and shows only the staff members in the selected group.

 

Does anyone know a trick? Joining the agegroup table on a dynamicage measure does not seem to be possible.

 

Thanks!

No RepliesBe the first to reply