Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
i am trying to create a graph with the firstsortedvalue with aggr but with no sucess.
I have this dataset:
Ci | O | Pi | En |
---|---|---|---|
- | E | P1 | E1 |
- | E | P2 | E2 |
- | E | P8 | E3 |
- | E | P8 | E4 |
- | E | P8 | E5 |
- | E | P2 | E6 |
- | E | P9 | E7 |
C1 | C | P1 | - |
C2 | C | P8 | - |
C3 | C | P1 | - |
C5 | C | P8 | - |
i want to know the Ci with max (count(Pi with most En))
C5 - 3
C2 - 3
C3 - 2
C1 - 1
I tried:
=max( aggr( count({<O = {'E'}>} En), Pi )) gives me the number 3. It's correct but i want de Ci instead of the sum value.
=sum(Aggr(FirstSortedValue(count({<O = {'E'}>} En), Pi), Ci)) gives me 0 instead of C5. I dont know where i am failling.
can anyone help me how to get the correct expression?
Greetings
hahaha ...tujse kam great hu:)
Thanks a lot stalwar1 and kush141087.
Both solutions work.
However i can't change the script. It must be done with set analysis.
I learned a lot with your answers.
Thank you very much for you help and time.
Greetings