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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Csalinas144
Helper II
Helper II

Sharepoint List - Documenting Changes in Field Values

Hey Team, 

Background: 
I have groups of excel files on sharepoint which are being updated monthly. 
I made 11 queries from those files (to reduce processing demand)
Then I brought them into a power desk top for additional transformations/measures/and visualizations. 

If a Team Member changes/updates a value in one of the source files (.xls) then the change is currently not recorded and saved. 


I want to be able to extract the older versions as the team member changes the cell values to track a progress. 

Is there a way to do this?? 

Thank You, 


 

Chris

Power Desk Top Newbie
@amitchandak @Fowmy @Greg_Deckler @VahidDM @edhans @KNP @MFelix @smpa01 @Burningsuit 

1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@Csalinas144 I know what REST URL you can use, that would give you the URL for each previous versions of the same file but I got stuck

To elaborate, if your sharepoint details are following

site_url = xyz.com/teams/Analytics
Folder Name = /teams/Analytics/Shared%20Documents/DataMaster
file_name =test.xlsx

You can start with a REST URL like following and wrap that in Xml.Tables(Web.Contents())

https://xyz.sharepoint.com/teams/Analytics/_api/web/GetFolderByServerRelativeUrl('/teams/Analytics/Shared%20Documents/DataMaster')/Files('test.xlsx')/versions?select=Url
let
    Source = Xml.Tables(Web.Contents("https://xyz.sharepoint.com/teams/Analytics/_api/web/GetFolderByServerRelativeUrl('/teams/Analytics/Shared%20Documents/DataMaster')/Files('test.xlsx')/versions?select=Url")),
    entry = Source{0}[entry],
    #"Added Custom" = Table.AddColumn(entry, "Custom", each let x =[content],
    y = x{0}[#"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"]{0}[properties]{0}[#"http://schemas.microsoft.com/ado/2007/08/dataservices"]{0}[Url]
    in "https://xyz.sharepoint.com/teams/Analytics"&y)
in
    #"Added Custom"

It will bring you here

smpa01_0-1636463860440.png

smpa01_1-1636463894099.png

Invoking Web.Contents on each of these URL does not return the excel and returns an error [Error Text -Specified value has invalid CRLF characters] while the same URL in browser returns that corresponding version of excel

 

There is a previous question on this  https://community.powerbi.com/t5/Desktop/Importing-previous-versions-of-Sharepoint-Files-into-PowerB...

and maybe omeallynile can shed some light on how to resolve that.

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

7 REPLIES 7
smpa01
Super User
Super User

@Csalinas144 I know what REST URL you can use, that would give you the URL for each previous versions of the same file but I got stuck

To elaborate, if your sharepoint details are following

site_url = xyz.com/teams/Analytics
Folder Name = /teams/Analytics/Shared%20Documents/DataMaster
file_name =test.xlsx

You can start with a REST URL like following and wrap that in Xml.Tables(Web.Contents())

https://xyz.sharepoint.com/teams/Analytics/_api/web/GetFolderByServerRelativeUrl('/teams/Analytics/Shared%20Documents/DataMaster')/Files('test.xlsx')/versions?select=Url
let
    Source = Xml.Tables(Web.Contents("https://xyz.sharepoint.com/teams/Analytics/_api/web/GetFolderByServerRelativeUrl('/teams/Analytics/Shared%20Documents/DataMaster')/Files('test.xlsx')/versions?select=Url")),
    entry = Source{0}[entry],
    #"Added Custom" = Table.AddColumn(entry, "Custom", each let x =[content],
    y = x{0}[#"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"]{0}[properties]{0}[#"http://schemas.microsoft.com/ado/2007/08/dataservices"]{0}[Url]
    in "https://xyz.sharepoint.com/teams/Analytics"&y)
in
    #"Added Custom"

It will bring you here

smpa01_0-1636463860440.png

smpa01_1-1636463894099.png

Invoking Web.Contents on each of these URL does not return the excel and returns an error [Error Text -Specified value has invalid CRLF characters] while the same URL in browser returns that corresponding version of excel

 

There is a previous question on this  https://community.powerbi.com/t5/Desktop/Importing-previous-versions-of-Sharepoint-Files-into-PowerB...

and maybe omeallynile can shed some light on how to resolve that.

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
edhans
Super User
Super User

The only reliable way is to archive off old versions and track those timestamps on the file. The tracking is simple, but keeping archived versions of Excel, not so much. That would be a bit of a pain.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Hmmm. I am willing to learn new things to make it happen. 

I am currently messing with a Flow through power automate. I am just not sure where to start. And where I am going on this one. 

Could you help me out? @edhans 

No, I am not a Power Automate expert. @mahoneypat is. He could chime in, or you could go to the Power Automate forum and check there.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Not an expert but know enough to think this is not a road you want to go down.  First, if these are xls files, you wouldn't be able to easily pull the data out of each file (easiest if it is formatted as a table in an xlsx file).  If you could do that, you likely wouldn't be able to store just the changes, so you'd be storing each file over again when it is modified (the thing that would trigger your flow).

 

If possible, I would consider an alternate data source (Dataverse, database, SharePoint list, etc.).

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


AlexisOlson
Super User
Super User

If you change the underlying data, you need to refresh that query to update Power BI. After refreshing, Power BI no longer has any idea what the previous data was.

 

Power BI is not an appropriate tool for storing versions of data. You need some sort of database or similar backend to handle that sort of thing.

What Types of coding, tools, ect. would I need to make this happen? 

@AlexisOlson 

Helpful resources

Announcements
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.