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
CloudMonkey
Post Prodigy
Post Prodigy

comparing different versoins of a database table

Hi,

 

I am dealing with a database table that can change daily (records can be updated, as well as added and deleted). My users will want to be able to do comparisons today versus yesterday, today versus last week and today versus last month.

 

I guess I need to import the data each day and add a column with the datestamp of the import. But I don't see how to do that automatically. Please could you tell me how to go about automating that process?

 

Thanks,

 

CM

2 REPLIES 2

@CloudMonkey My personal opinion would be to build the process in your database. Snapshot the table as it is, then create a process that will add new rows, and update existing rows depending on if the data was deleted or updated.

Status column, change date, etc can be the additional columns. Then Power BI just always looks at the table, and you have a process that is tracking the changes within it. I'm not aware of any way to do the diff in power bi.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Agree with @Seth_C_Bauer. Even if you could automate the process in PBI, then PBI would not be able to store this data in the pbix accordingly.

 

If (for some reason) you cannot adjust in your database, you could create the additional fields in PBI and use the R-extension to create a csv-export. (Using Powershell and task automation should give the ability to automate this process, but it's pretty hacky)

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

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.