# Taking regular snapshots with Power Query/Power Pivot



## gatonisus (Dec 23, 2015)

Hi,
I have my Power Query connected to a live database.
Is there a way to regularly (lets say monthly) save the data (automatically) in the Power Pivot data model and append it on the previous data?

Example:
One column in the database:
a
b
c

In January the snapshot should put in Power Pivot: 
Jan| a
Jan| b
Jan| c

In February should append for example:
Feb| b
Feb| c
Feb| d


I hope the question is clear.


----------



## SimonNU (Dec 23, 2015)

If you're wanting to perform incremental loading then there is no easy way to do what you ask because PQ can't use a data model as a data source.

One method is to create a self-referential PQ script.  This script will read from the existing data in an Excel table (not in a data model),  append new data to it, and then write back _to the same table _and the data model. You will be limited by row count.

There is also a VBA solution involving writing to CSVs from the data model but I wouldn't go there. 

I would suggest, if possible, simply pulling all of the data from the database (for the required date range) instead of incrementally loading it.


----------

