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

totals function in a table

Greetings Community,

I have a totals function that I would like to change into a KPI but the numbers are matching up when doing it.

within my measure in the table I have this:

Expression: sum(distinct completed_credits)

my table looks like this:

The blacked out employee_id is showing only one employee and the course_name is a subset of courses for that training model.

The total for the sum of completed credits only works correctly when I have employee_id and course_name within the table and if I have the Totals Function set to Sum.

can anyone give me some advise on how to change this from a table view over to a KPI? does it have something to do with the aggr() function???

1 Solution

Accepted Solutions
sunny_talwar

May be try this in a KPI object

Sum(Aggr(Sum(DISTINCT completed_credits), employee_id, training_model_date, course_name))

View solution in original post

5 Replies
sunny_talwar

May be try this in a KPI object

Sum(Aggr(Sum(DISTINCT completed_credits), employee_id, training_model_date, course_name))

Anonymous
Not applicable
Author

just tested it and it worked!

always a pleasure sunny!

Anonymous
Not applicable
Author

One more Question, if I wanted to add a set analysis based on the brand.

IE ( Jeep, Dodge, Ram, etc)  into that function would it look something like this?

Sum(Aggr(Sum(DISTINCT {<Brand = {'Jeep'}>}completed_credits), employee_id, training_model_date, course_name))

sunny_talwar

And may be add it here as well

Sum({<Brand = {'Jeep'}>} Aggr(Sum(DISTINCT {<Brand = {'Jeep'}>}completed_credits), employee_id, training_model_date, course_name))

Anonymous
Not applicable
Author

Sum({<Brand = {'Jeep'}>} Aggr(Sum(DISTINCT completed_credits), employee_id, training_model_date, course_name))

gives me the results I needed