REPEAT takes one or more values and returns a column containing as many copies of the values as specified. REPEAT is useful if you want to show specific values in your Klip multiple times, even if they only appear once (or not at all) in your data source.
REPEAT( values, times )
Hover over the image below to watch a short video.
Using REPEAT to create a target line on a chart
You can use REPEAT to create multiple instances of values to form a target line across the X axis of your chart. The example below calculates the AVERAGE of the Score column of data and repeats it across the X axis based on the counted number of cities listed.
- values: set to the score data in column C (
C:C) and wrapped in SLICE to remove the column header.
- !formulareference: set to reference the X axis.
SELECT a pattern of data
SELECT(SLICE(values),REPEAT( ARRAY( "false,false,true") ,3))