OpenBI Docs Buy

GENERATESERIES

A table of one column, [Value], of numbers from a start to an end by a step (1 by default).

Group: Table manipulation. Compatible with DAX.

Syntax

GENERATESERIES ( <startValue>, <endValue> [, <incrementValue>] )
ParameterTypeDescription
startValueNumber or dateThe first value.
endValueNumber or dateThe value the series may reach but not pass.
incrementValueNumber
optional
The step between two values, larger than zero; 1 when left out.

Returns

Table. One column, [Value], from the start up to the end, one step apart.

Remarks

  • When the end is below the start, the table is empty. A step of zero or less, or a blank argument, is an error.
  • With dates the values are dates: a step of 1 is a day, 0.25 is six hours.
  • A decimal step is added to the previous value again and again, and binary rounding adds up. GENERATESERIES ( 0.1, 0.3, 0.1 ) gives 0.1 and 0.2 only, because the third sum lands a hair above 0.3. For exact decimals, count in whole numbers and divide: SELECTCOLUMNS ( GENERATESERIES ( 1, 3 ), "Rate", [Value] / 10 ).
  • It is the usual way to build the table behind a what-if parameter.

Examples

Quarter steps from 0 to 1

EVALUATE
GENERATESERIES ( 0, 1, 0.25 )
ORDER BY [Value]
Value
0
0.25
0.5
0.75
1

Four days

EVALUATE
GENERATESERIES ( DATE ( 2026, 1, 1 ), DATE ( 2026, 1, 4 ) )
ORDER BY [Value]
Value
2026-01-01
2026-01-02
2026-01-03
2026-01-04

A decimal step that misses the end

The third value would be 0.30000000000000004, past the end, so the series stops at 0.2.

EVALUATE
GENERATESERIES ( 0.1, 0.3, 0.1 )
ORDER BY [Value]
Value
0.1
0.2

CALENDAR, SELECTCOLUMNS, ADDCOLUMNS, DATATABLE, ROW.

Last updated · OpenBI Studio 0.3.74