3 Replies Latest reply: Jun 13, 2012 3:11 AM by bruno bortignon

# Different dimensions in count

Hi to everyone,

I need help in determining a value which is the ratio between a sum of sales in a month and a count of a distinct number of employees that are prensent in a plant on that month.

The expression I am using is:

=sum(PROD_Euro_BW) / (Count (DISTINCT {< YearP = {PROD_Year_BW}, MonthP = {PROD_Month_BW}>} ID ))

Now PROD_Year_BW and PROD_Month_BW are the dimentions used to determine the sum of PROD_Euro_BW but ID depends on Year and Month. The result of this ratio is a linear chart whose X axis is a date made from DATE(MakeDate(PROD_Year_BW,PROD_Month_BW),'yyyy-MM') and Y axis is the ratio.

I hope this is clear and that someone can give me a hand on this as I am really stuck on it.

Thank you in advance for any help.

bb

• ###### Re: Different dimensions in count

Hi,

no-one can give me an input on this?

Thanks

• ###### Re: Different dimensions in count

Hi,

so u want count of distinct employee for currrent month or whole months.

thnx

rohit

• ###### Re: Different dimensions in count

Hi,

I need to count the total number of employees for each month. The problem is that PROD_Euro_BW depends on  PROD_Year_BW and where as ID depends on YearP and the two time dimensions have no correlation.

Also I am using this count in a Graph where the time dimension is based on PROD_Year_BW+PROD_Month_BW.

Table Revenue ( PROD_Euro_BW, PROD_Year_BW, PROD_Month_BW....... )

Table Employees ( ID, YearP, MonthP ..... )

I hope it is clear ;-)

Thanks