Forum Discussion

PaulKeijzers's avatar
PaulKeijzers
Frequent Visitor
10 years ago
Solved

Iterating trough items with steps of 500 items

Hi,   i am in a situation where i need to create a loop  for example i know i have 2579 items now i want to have a table autogenerated because the number can also be 3200 or more. in the table th...
  • Eric_Zhang's avatar
    10 years ago

    PaulKeijzers

     

    You can reference a calculated table as below.

     

    Number Table = 
    FILTER (
        SELECTCOLUMNS (
            FILTER (
                ADDCOLUMNS (
                    CALENDAR ( "1970-01-01", "2020-12-31" ),
                    "daysSince 1970-01-01", DATEDIFF ( "1970-01-01", [Date], DAY )
                ),
                MOD ( [daysSince 1970-01-01], 500 ) = 0
            ),
            "num", [daysSince 1970-01-01]
        ),
        //[num] <= COUNTROWS ( YourTable )
        [num] <=2579
    )