Hi @UserID16644
Conditional formula is a bit tricky in JMP.
As @jthi mentioned, you need 2 IFs.
You can also add formula column as below;
-Add 1st IF = column sum if code not 0
-Add 2nd IF = display result only if code not 0
Result:
JSL Script (refer workflow builder / log)
Names Default To Here( 1 );
//Change column info: Total % (Col Sum Qty/Total Count)
Data Table( "dt1" ):Column 4 << Set Name( "Total % (Col Sum Qty/Total Count)" )
<< Set Formula(
If( !:Code == 0,
Col Sum( If( !:Code == 0, :Qty, . ) ) / :Total Count
)
);
//Change column format: Total % (Col Sum Qty/Total Count)
Data Table( "dt1" ):"Total % (Col Sum Qty/Total Count)"n <<
Format( "Percent", 12, 2 );