Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Bryer
New Member

Attempting to create Historical Data Table

Currently I have a table in power BI that pulls in from a SQL server, it only pulls the last 30 days of data because that is all that is stored on the server. I want to be able to build a simplie historical data table in power BI that stores data from further back however, by this I mean it will start storing the data now and continue to build on itself in the future. I want the historical table to just be a simple measure from the source table that counts the amount entries by month, so it would just be two columns one for the month and one for the count. So the goal is for the historical table to grow for every month so I can build a trendline, while the table being pulled from SQL will always only be pulling the last 30 days of data. Is this possible to do? And if so how?

2 ACCEPTED SOLUTIONS
MNedix
Solution Supplier
Solution Supplier

Look for appending queries. You can either 1. generate daily data to be stored on an OneDrive or Sharepoint, then import it in PowerBI, then append the new query to the existing one or 2. via Direct Query perhaps (never done it though).

View solution in original post

danextian
Super User
Super User

hi @Bryer 

The data being fed into Power BI is the data from the source. If your data doesn't have the records from beyond 30 days then Power BI won't have it as well.  That being said, you must build a source that has the data you need. Alternatively, if you're in a Fabric SKU you can use dataflow Gen2 that allows data to be appended to the result of the previous runs  instead of replacing them but for your use case and for a very simple table, I would just build that historical source data.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

hi @Bryer 

The data being fed into Power BI is the data from the source. If your data doesn't have the records from beyond 30 days then Power BI won't have it as well.  That being said, you must build a source that has the data you need. Alternatively, if you're in a Fabric SKU you can use dataflow Gen2 that allows data to be appended to the result of the previous runs  instead of replacing them but for your use case and for a very simple table, I would just build that historical source data.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
MNedix
Solution Supplier
Solution Supplier

Look for appending queries. You can either 1. generate daily data to be stored on an OneDrive or Sharepoint, then import it in PowerBI, then append the new query to the existing one or 2. via Direct Query perhaps (never done it though).

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.