I am trying to calculate production capacity and have the following inputs:
Product Group - overall capacity is limited by the bottleneck process
Process
Machine
Product Type - some processes have machines have varying capacity depending on product type
Production Shift
[TABLE="class: grid, width: 406, align: left"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]GROUPING[/TD]
[TD]CALCULATION[/TD]
[TD]EXAMPLE[/TD]
[TD]QUANTITY[/TD]
[/TR]
[TR]
[TD]PRODUCT GROUP[/TD]
[TD]MIN[/TD]
[TD]PRODUCT GROUP A[/TD]
[TD="align: right"]300[/TD]
[/TR]
[TR]
[TD]PROCESS[/TD]
[TD]SUM[/TD]
[TD]PROCESS 1[/TD]
[TD="align: right"]300[/TD]
[/TR]
[TR]
[TD]MACHINE[/TD]
[TD]MIN[/TD]
[TD]Machine 1[/TD]
[TD="align: right"]300[/TD]
[/TR]
[TR]
[TD]PRODUCT TYPE[/TD]
[TD]SUM[/TD]
[TD](blank)[/TD]
[TD="align: right"]300[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD](blank)[/TD]
[TD="align: right"]300[/TD]
[/TR]
[TR]
[TD]PROCESS[/TD]
[TD]SUM[/TD]
[TD]PROCESS 2[/TD]
[TD="align: right"]450[/TD]
[/TR]
[TR]
[TD]MACHINE[/TD]
[TD]MIN[/TD]
[TD]Machine 1[/TD]
[TD="align: right"]175[/TD]
[/TR]
[TR]
[TD]PRODUCT TYPE[/TD]
[TD]SUM[/TD]
[TD](blank)[/TD]
[TD="align: right"]175[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD]First[/TD]
[TD="align: right"]50[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD]Second[/TD]
[TD="align: right"]75[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD]Third[/TD]
[TD="align: right"]50[/TD]
[/TR]
[TR]
[TD]MACHINE[/TD]
[TD]MIN[/TD]
[TD]Machine 2[/TD]
[TD="align: right"]275[/TD]
[/TR]
[TR]
[TD]PRODUCT TYPE[/TD]
[TD]SUM[/TD]
[TD](blank)[/TD]
[TD="align: right"]275[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD]First[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD]Second[/TD]
[TD="align: right"]50[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD]Third[/TD]
[TD="align: right"]125[/TD]
[/TR]
[TR]
[TD]PROCESS[/TD]
[TD]SUM[/TD]
[TD]PROCESS 3[/TD]
[TD="align: right"]500[/TD]
[/TR]
[TR]
[TD]MACHINE[/TD]
[TD]MIN[/TD]
[TD]MACHINE 1[/TD]
[TD="align: right"]250[/TD]
[/TR]
[TR]
[TD]PRODUCT TYPE[/TD]
[TD]SUM[/TD]
[TD]Type A[/TD]
[TD="align: right"]250[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD](blank)[/TD]
[TD="align: right"]250[/TD]
[/TR]
[TR]
[TD]MACHINE[/TD]
[TD]MIN[/TD]
[TD]MACHINE 2[/TD]
[TD="align: right"]250[/TD]
[/TR]
[TR]
[TD]PRODUCT TYPE[/TD]
[TD]SUM[/TD]
[TD]Type A[/TD]
[TD="align: right"]350[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD](blank)[/TD]
[TD="align: right"]350[/TD]
[/TR]
[TR]
[TD]PRODUCT TYPE[/TD]
[TD]SUM[/TD]
[TD]Type B[/TD]
[TD="align: right"]250[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD](blank)[/TD]
[TD="align: right"]250[/TD]
[/TR]
</tbody>[/TABLE]
I have tried using the following formula which aggregated correctly at the machine level but not at the product group level:
production capacity:=SWITCH(TRUE(),
HASONEVALUE(production_capacity[product group]), MIN(production_capacity[capacity]),
HASONEVALUE(production_capacity[process]), SUM(production_capacity[capacity]),
HASONEVALUE(production_capacity[machine]), MIN(production_capacity[capacity]),
HASONEVALUE(production_capacity[product_type]), SUM(production_capacity[capacity]),
SUM(production_capacity[capacity]))
What am I missing here? Thank you in advance for any help.
Jake
Product Group - overall capacity is limited by the bottleneck process
Process
Machine
Product Type - some processes have machines have varying capacity depending on product type
Production Shift
[TABLE="class: grid, width: 406, align: left"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]GROUPING[/TD]
[TD]CALCULATION[/TD]
[TD]EXAMPLE[/TD]
[TD]QUANTITY[/TD]
[/TR]
[TR]
[TD]PRODUCT GROUP[/TD]
[TD]MIN[/TD]
[TD]PRODUCT GROUP A[/TD]
[TD="align: right"]300[/TD]
[/TR]
[TR]
[TD]PROCESS[/TD]
[TD]SUM[/TD]
[TD]PROCESS 1[/TD]
[TD="align: right"]300[/TD]
[/TR]
[TR]
[TD]MACHINE[/TD]
[TD]MIN[/TD]
[TD]Machine 1[/TD]
[TD="align: right"]300[/TD]
[/TR]
[TR]
[TD]PRODUCT TYPE[/TD]
[TD]SUM[/TD]
[TD](blank)[/TD]
[TD="align: right"]300[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD](blank)[/TD]
[TD="align: right"]300[/TD]
[/TR]
[TR]
[TD]PROCESS[/TD]
[TD]SUM[/TD]
[TD]PROCESS 2[/TD]
[TD="align: right"]450[/TD]
[/TR]
[TR]
[TD]MACHINE[/TD]
[TD]MIN[/TD]
[TD]Machine 1[/TD]
[TD="align: right"]175[/TD]
[/TR]
[TR]
[TD]PRODUCT TYPE[/TD]
[TD]SUM[/TD]
[TD](blank)[/TD]
[TD="align: right"]175[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD]First[/TD]
[TD="align: right"]50[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD]Second[/TD]
[TD="align: right"]75[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD]Third[/TD]
[TD="align: right"]50[/TD]
[/TR]
[TR]
[TD]MACHINE[/TD]
[TD]MIN[/TD]
[TD]Machine 2[/TD]
[TD="align: right"]275[/TD]
[/TR]
[TR]
[TD]PRODUCT TYPE[/TD]
[TD]SUM[/TD]
[TD](blank)[/TD]
[TD="align: right"]275[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD]First[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD]Second[/TD]
[TD="align: right"]50[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD]Third[/TD]
[TD="align: right"]125[/TD]
[/TR]
[TR]
[TD]PROCESS[/TD]
[TD]SUM[/TD]
[TD]PROCESS 3[/TD]
[TD="align: right"]500[/TD]
[/TR]
[TR]
[TD]MACHINE[/TD]
[TD]MIN[/TD]
[TD]MACHINE 1[/TD]
[TD="align: right"]250[/TD]
[/TR]
[TR]
[TD]PRODUCT TYPE[/TD]
[TD]SUM[/TD]
[TD]Type A[/TD]
[TD="align: right"]250[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD](blank)[/TD]
[TD="align: right"]250[/TD]
[/TR]
[TR]
[TD]MACHINE[/TD]
[TD]MIN[/TD]
[TD]MACHINE 2[/TD]
[TD="align: right"]250[/TD]
[/TR]
[TR]
[TD]PRODUCT TYPE[/TD]
[TD]SUM[/TD]
[TD]Type A[/TD]
[TD="align: right"]350[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD](blank)[/TD]
[TD="align: right"]350[/TD]
[/TR]
[TR]
[TD]PRODUCT TYPE[/TD]
[TD]SUM[/TD]
[TD]Type B[/TD]
[TD="align: right"]250[/TD]
[/TR]
[TR]
[TD]PRODUCTION SHIFT[/TD]
[TD] [/TD]
[TD](blank)[/TD]
[TD="align: right"]250[/TD]
[/TR]
</tbody>[/TABLE]
I have tried using the following formula which aggregated correctly at the machine level but not at the product group level:
production capacity:=SWITCH(TRUE(),
HASONEVALUE(production_capacity[product group]), MIN(production_capacity[capacity]),
HASONEVALUE(production_capacity[process]), SUM(production_capacity[capacity]),
HASONEVALUE(production_capacity[machine]), MIN(production_capacity[capacity]),
HASONEVALUE(production_capacity[product_type]), SUM(production_capacity[capacity]),
SUM(production_capacity[capacity]))
What am I missing here? Thank you in advance for any help.
Jake