Occasional Contributor

Joined:

Nov 11, 2017

## Number of seris

Hi

During stacking, I want to make Number of Series a variable which sould be calculated before. It says, this should be a positive intege. Is there any workaround?

// Stack the data
Data Table( "Sample_data2" ) << Stack(
columns( ColList ),
Source Label Column( "Label" ),
Stacked Data Column( "Data" ),
Number of Series( j/12 ),
Contiguous
);
/*:

Number of series should be a positive integer

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Super User

Joined:

Jun 22, 2012

Solution

## Re: Number of seris

You have to evaluate the equasion you are using for the setting of the numer of series

``````// Stack the data
Data Table( "Sample_data2" ) << Stack(
columns( ColList ),
Source Label Column( "Label" ),
Stacked Data Column( "Data" ),
Number of Series(eval( j/12 ) ),
Contiguous
);``````

The resulting value has to be an integer, which means your value of the variable "j" has to be, 12, 24, 36 etc

Jim
Highlighted

Super User

Joined:

Jun 22, 2012

Solution

## Re: Number of seris

You have to evaluate the equasion you are using for the setting of the numer of series

``````// Stack the data
Data Table( "Sample_data2" ) << Stack(
columns( ColList ),
Source Label Column( "Label" ),
Stacked Data Column( "Data" ),
Number of Series(eval( j/12 ) ),
Contiguous
);``````

The resulting value has to be an integer, which means your value of the variable "j" has to be, 12, 24, 36 etc

Jim