Subscribe Bookmark RSS Feed

JSL- New Table() assistance needed.

loysius

Community Trekker

Joined:

Jun 5, 2015

Hi there,

I'm trying to create a table to show my analysis. This is what I'm trying:

quantityBulbsShipped = 0;

quantityLensesShipped = 0;

Current Data Table(dtBulbsOnly);

Summarize(quantityBulbsShipped = Sum(:qtyOrdered));

Current Data Table(dtLensesOnly);

Summarize(quantityLensesShipped = Sum(:qtyOrdered));

dtSolution = New Table("Percentage of bulbs shipped with lens",

Add Row(1),

New Column("Quantity bulbs shipped", "Continuous", Set Values(quantityBulbsShipped)),

New Column"Quantity Lenses Shipped", "Continuous", Set Values(quantityLensesShipped)),

New Column("% bulbs shipped with lenses", "Continuous", Set Values(quantityLensesShipped *100.0 / quantityBulbsShipped)));

ERROR: basically there is an issue with me using variables in the above Set Values() function inside the New Table() function.

Does anyone know how to get this to work or make a similarly simple output window?

Thank you a lot!

-Loysius

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

I think Set Values() requires a list (or matrix) argument.


Try:

Set Values( {quantityBulbsShipped} )


or

Set Values( list(quantityBulbsShipped) )


2 REPLIES
Solution

I think Set Values() requires a list (or matrix) argument.


Try:

Set Values( {quantityBulbsShipped} )


or

Set Values( list(quantityBulbsShipped) )


loysius

Community Trekker

Joined:

Jun 5, 2015

Thank you very much for the response. Yup, both of your solutions work. You're awesome