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

calculated dimension with class and set analysis

Hi,

I want to do the following:
I have several jobs with several line items for different operations. For example I have Job number 1 and in here I have 3 line items for the operation MR with a value of 1 in each line. Basically a total of 3.

Now I want to have a calculated dimension, where I count the job (in attached file) which have values for MR in 2 or 4 or 6. I did that with the class formula:

=class(sum({<Operation={'MR'}>}Minutes),2)

But that doesn't work. Can somebody help?

Thanks in advance,

Oliver



1 Solution

Accepted Solutions
johnw
Champion III
Champion III

You can't use aggregation functions in a calculated dimension without using aggr() and telling it what dimension(s) to aggregate across. In this case, you want to aggregate by Job (or more plainly, you want the sum of MR operation minutes for each job individually, not the grand total of all minutes in the whole system, and the way you do that is to aggregate by Job). So I think you want this:

aggr(class(sum({<Operation={'MR'}>}Minutes),2),Job)

It produces the graph I think you want, in any case.

View solution in original post

2 Replies
johnw
Champion III
Champion III

You can't use aggregation functions in a calculated dimension without using aggr() and telling it what dimension(s) to aggregate across. In this case, you want to aggregate by Job (or more plainly, you want the sum of MR operation minutes for each job individually, not the grand total of all minutes in the whole system, and the way you do that is to aggregate by Job). So I think you want this:

aggr(class(sum({<Operation={'MR'}>}Minutes),2),Job)

It produces the graph I think you want, in any case.

Not applicable
Author

Cool, that was exactly what I wanted.

Oliver