2 Replies Latest reply: Feb 25, 2013 8:04 AM by Giorgia Michieli

# Set analysis and aggr function

Hi everyone,

I have 2 set analysis and I would like to have a pivot like this:

CHIAVE LOCAZIONE   2013/01   2012/12    2012/11 ....

loc1                10        5            13

loc2                45        7             8

Quantity is obtained by a fraction of 2 set analysis

SET 1:

=(sum({\$<[CHIAVE LOCAZIONE]={'8§OUTCHIMICO','8§OUTABRASIV', '8§SMALTIMENT'}>}(QUANTITA*COSTO)))

and I would like to aggr this for year and month

SET 2

the other one is

=(sum({\$<[COD SOCIETA]={'8'}>} total(QUANTITA*COSTO)))

in this one total is NOT correct because i would like to have quantità*costo aggr by year and month

So, month per month i would see quantità*costo of this set of LOCAZIONE

[CHIAVE LOCAZIONE]={'8§OUTCHIMICO','8§OUTABRASIV', '8§SMALTIMENT'}

in fraction with

quantità*costo of ALL CHIAVE LOCAZIONE

I'm not able to write the 2 correct set analysis. Can You help me please?

Thankyou

• ###### Re: Set analysis and aggr function

=(sum({\$<[CHIAVE LOCAZIONE]={'8§OUTCHIMICO','8§OUTABRASIV', '8§SMALTIMENT'}>}aggr(sum(QUANTITA*COSTO),YEAR_MONTH))

=(sum({\$<[COD SOCIETA]={'8'}>} aggr(sum(QUANTITA*COSTO),YEAR_MONTH))

• ###### Re: Set analysis and aggr function

Thankyou but this is not i really want. I need group by for year and month for both expressions

expression 1

=(sum({\$<[CHIAVE LOCAZIONE]={'8§OUTCHIMICO','8§OUTABRASIV', '8§SMALTIMENT'}>}aggr((QUANTITA*COSTO),YEAR_MONTH))

in this way doesn't work...

And the second one

=(sum({\$<[COD SOCIETA]={'8'}>} aggr((QUANTITA*COSTO),YEAR_MONTH))

in this way doesn't work...