Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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)

3 Replies
maxgro
MVP
MVP

if I understand

1.png

Not applicable
Author

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

maxgro
MVP
MVP

script

a:

LOAD Machine,

    Cycle

FROM

[http://community.qlik.com/thread/150297]

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

left join (a)

load

  Machine,

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

Resident a

Group by Machine

;

chart is CycleGroup and count distinct