Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
acholchemit
Contributor II
Contributor II

Trying to get highest value for a dimension in a KPI

I have a table of data that looks like the following;

Customer, Visit Duration

123, 60

123, 45

456, 50

789, 30

789, 50

789, 20

I am trying to put in a KPI the highest count of rows or entries by Customer.  I have seen a few similar examples of this but so far I haven't been able to get this working.

This is what I have so far which as I say doesn't work.

FirstSortedValue([Customer Number], -Aggr(Count({$<[Customer Number]-={},[Visit In Year To Date]={"-1"}>}[Customer Number]), [Customer Number]))

Any help appreciated.

1 Solution

Accepted Solutions
acholchemit
Contributor II
Contributor II
Author

I think that I may have solved this by using the following code

Max( Aggr(Count({$<[Customer Number]-={''},[Visit In Year To Date]={"-1"}>}[Visit Entry Number]),[Customer Number]))

 

View solution in original post

1 Reply
acholchemit
Contributor II
Contributor II
Author

I think that I may have solved this by using the following code

Max( Aggr(Count({$<[Customer Number]-={''},[Visit In Year To Date]={"-1"}>}[Visit Entry Number]),[Customer Number]))