Trying to have a measure calculate a new column. I am using switch true to have it determine between two equations.

Colum A for this example is Cycle Time
Column B is mold cavitation

I am trying to calculate throughput. If Mold Cavitation is blank or 0, I want this equation:
(60/Cycle Time)*60.

If Mold Cavitation is NOT Blank and is above 0, I want it to multiply the original equation by the number of cavities:
(60/Cycle Time)60Mold Cavitation.

I have tried so many variations but it always comes back with ātoo many columns, cannot return a scalar valueā.

I have attached an example where I directly used filters and equations in the Switch True formula, and an example where I used other measures, with those measures attached. Please help!

If you wouldnāt mind, please post the calculation that worked for you. It appears that you just changed the order of the calculation and it worked, however, Iām sure I will encounter this error sometime in the future and would love some insight into how you were able to resolve the error.
Thank you.

Here is what worked for me:
AVG Conventional Throughput =
CALCULATE(
AVERAGEX(āCase Study Databaseā,
SWITCH(
TRUE(),
NOT(ISBLANK(āCase Study Databaseā[MoldCavitation])) && āCase Study Databaseā[MoldCavitation]>0, DIVIDE(60,āCase Study Databaseā[ConventionalCycleTime])60āCase Study Databaseā[MoldCavitation],
ISBLANK(āCase Study Databaseā[MoldCavitation]) && āCase Study Databaseā[MoldCavitation]<=0, DIVIDE(60,āCase Study Databaseā[ConventionalCycleTime])*60,
DIVIDE(60,āCase Study Databaseā[ConventionalCycleTime])*60 )))

// This formula calculates the average conventional throughput (in parts per hour). If mold cavitation is entered, it calculates parts per hour as (60/Cycle Time)60Mold Cavitation. If no mold cavitation entered it assumes cavitation of 1: (60/Cycle Time)*60.))))