3 Replies Latest reply: Feb 1, 2015 6:44 AM by Massimo Grossi

# complex set analysis

Dear all,

I would like to do the following. I have machines that follow certain maintenance cycles:

MachineCycle
A3
B2
B3
B3
C3
D2
D3
E3
F2
F3
G3

That means I have 3 machines that have cycle 2 and 3, and 4 machines that have only cycle 3.

If I do =count(DISTINCT Maschine) with Dimension Cycle I something like this:

Cycle=count(DISTINCT Maschine)
23
38
TOTAL7

But I would like to have that the machines are counted, that have cycle 2 and 3 and machines that have only cycle 3.

So my table should look like:

Cycle=count(??????? Maschine)
23
34
TOTAL7

How can I achive this?

Thanks for any help...

Peter (desperate)

• ###### Re: complex set analysis

if I understand

• ###### Re: complex set analysis

Thanks, Massimo.

I only have the personal edition, so I can't open the example.

But I found out. I have to use the aggr() function:

=aggr(min(Cycle),Machine) as new Dimension... worked.

Peter

• ###### Re: complex set analysis

script

a:

Cycle

FROM

(html, codepage is 1252, embedded labels, table is @1);

left join (a)

Machine,

Concat(DISTINCT Cycle, '-', Cycle) as CycleGroup

Resident a

Group by Machine

;

chart is CycleGroup and count distinct