Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

How to split rows by 5000 records?

Dear All,   I have a 100k+ rows table.   I have a task to split this table by 5000 records each. It doesn't matter in what order to arrange the records. I just need to get 20+ tables that will co...
  • dedelman_clng's avatar
    9 years ago

    This might be more manual than you want, but you could do this:

     

    1) Set an INDEX number for the original table (it's in Query Editor under Add Coluimn)

    2) Under Modeling, select New Table and create 20 calculated tables like so:

     

    Table1 = CALCULATETABLE(
                   OrigTable,
                   OrigTab[Index] >=1 && OrigTab[Index] <= 5000
    )
    
    Table2 = CALCULATETABLE(
                   OrigTable,
                   OrigTab[Index] >=5001 && OrigTab[Index] <= 10000
    )
    
    etc

     

    Hope this helps

    David

  • Anonymous's avatar
    Anonymous
    9 years ago

    Update:

     

    I found the easier way to do it. Maybe it will help someone else.

     

      1. Create an Index column
      2. Add the Index as a filter on the report view
      3. Click 'New Group' in the fields menu
      4. Set the required bin size. That is!

    That is why I love PowerBi :)