Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Class function by date

I'm trying to use the Class function to show the count of client per representative, broken down by date. For example, I'm trying to show that in year 2009, 50 representatives had 3 clients, 24 representatives had 5 clients, and 17 reps had 6 clients. However, there are instances where a client will switch representatives over a year. Therefore, the class function isn't properly working when you drill down into the dates since it doesn't seem to take date into consideration.

My dimensions are Date and a calculated dimension of Aggr(Class(Count(distinct ClientNumber),1),[Representative Name]) and the expression is Count(distinct ClientNumber). Unfortunately I can't share data due to confidentiality, but is there any way of doing this better? Perhaps some sort of IF loop?

1 Solution

Accepted Solutions
Not applicable
Author

I managed to fix this by adding the Date to the Aggr calculation.


So my calculated dimension is now Aggr(Class(Count(distinct ClientNumber),1),[Representative Name], [Date])

View solution in original post

2 Replies
tresesco
MVP
MVP

To be honest, I could not realize the usage of class() here. Could you share a sample app with dummy data set explaining the expected output?

Not applicable
Author

I managed to fix this by adding the Date to the Aggr calculation.


So my calculated dimension is now Aggr(Class(Count(distinct ClientNumber),1),[Representative Name], [Date])