Individual user values that are less than the 1st quartile of the total set still populate as 4, which suggests that the set analysis is comparing the avg of the entire dataset to the 1st quartile of the entire data set. I have also tried to wrap the avg in aggr by the User dimension but still cannot get it to work.
Has anyone successfully implemented a similar set analysis expression?
This expression would first calculate the "rating" and the user + department level. Then if the chart it's used in only has Department as a dimension then it would sum the "rating" for users in that department. The most common mistake with Aggr (aside from using it when it's not needed) is forgetting that it's virtual table that gets passed to attach to the dimensions on the chart object. The virtual table is not attached to the rest of the data in your app. In this example if Department wasn't included in the Aggr portion there would be no way to accurately assign users to the dimension in the chart.
So far your addition to my expression works with what I am trying to do. My next step is trying to use this expression to assign values to the other tiers.
For example, I would like to have a system that assigns 1 to the the avg(duration) < .fractile(duration,.25) and then 2 to the avg(duration) between fractile(duration, .25) and fractile(duration, .50) and then follow the same pattern assigning 3 and 4.
I am not too familiar with Aggr and am not having much luck expanding this expression to include multiple ratings. Do you have any suggestions for this?
I am going to keep playing around with the expression but so far I have tried: