Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
i have a data set of production that i am doing some calculation and i need to show the sum by month
here is the data sample:
PRD | DATE | PRODPOOL | ITEMID | QTYSCHED | QTYGOOD | TIME | NORMALIZATION | TIME/NORMALIZATION |
PRD00067352 | 01/01/2017 | 20 | 5D26-02GNPC-001 | 2 | 2 | 30 | 5 | 6 |
PRD00067356 | 01/01/2017 | 20 | 5D26-02GNPC-001 | 1 | 1 | 30 | 5 | 6 |
PRD00068496 | 01/01/2017 | 20 | 5CR3000000-01BTXH-01 | 95 | 95 | 15 | 5 | 3 |
PRD00070965 | 02/01/2017 | 20 | 5D26-04A1XH-001 | 30 | 30 | 60 | 5 | 12 |
PRD00070968 | 01/01/2017 | 20 | 5D26-04A1XF-001 | 40 | 40 | 60 | 5 | 12 |
PRD00071041 | 02/01/2017 | 32 | 5RP500-34BTN5-006 | 200 | 200 | 15 | 0.67 | 22.39 |
PRD00071183 | 01/01/2017 | 20 | 5CR2000000-06G0NB-01 | 5 | 5 | 15 | 5 | 3 |
PRD00071185 | 02/01/2017 | 32 | 5RP500-34BTN5-006 | 200 | 200 | 15 | 0.67 | 22.39 |
PRD00071338 | 02/01/2017 | 20 | 5CR3000000-10R0XH-01 | 4 | 4 | 15 | 5 | 3 |
PRD00072524 | 02/01/2017 | 20 | 5NR4020NS-02NTPR-002 | 50 | 50 | 5 | 5 | 1 |
PRD00072829 | 01/01/2017 | 10 | 0252-050002NR-FG | 200 | 117 | 5 | 0 | 5 |
PRD00073205 | 02/01/2017 | 20 | 0242-2606PC-FF | 120 | 36 | 5 | 5 | 1 |
PRD00073299 | 01/01/2017 | 20 | 5D26NS-06R2XH-001 | 2 | 2 | 60 | 5 | 12 |
PRD00073494 | 01/01/2017 | 20 | 5VB60-12N1XI-004 | 1 | 1 | 0 | 5 | 0 |
when i try to get the sum of prodpool by month i cant seem to get it when i remove the PRD from the table
DATE by MONTH | PRODPOOL | QTYSCHED | QTYSCHED*TIME/NORMALIZATION | ||
---|---|---|---|---|---|
JAN 2017 | 20 | 14,630 | 27,089 | ||
JAN 2017 | 30 | 31,215 | 49,977 | ||
JAN 2017 | 32 | 7,671 | 48,764 |
can someone help?
HI,
Sum of Normalization is zero for Prod Pool 10 and any thing divide by zero is undefined.
Regards,
Nandkishor Pandirkar
maybe for a single line but not all of them
i need the calculation for each row of PRD and then to sum all the results
i do the calculation for each line of PRD
i take the QTYSCHED*TIME/NORMALIZATION
I want the total to be the total for each month and for each prodpool
Use
(Sum(QTYSCHED)*sum(TIME))/sum(NORMALIZATION)
and see what happens
i get crazy numbers
May be you can write a if condition if Normalization is 0 then the expression is 0