Forum Discussion
Tracking data changes
- 3 years ago
Ok, now I see that the tables are not the same. Actually - at all. This will be harder to approach, but can be done.
1. I've created a new folder on my computer: "D:\PowerBI\Tracking changes in files\source" that contains the files from you (you can change it later to Sharepoint folder).
2. I've prepared a parameter for you that stores folder location so you can see it later:
3. I've created a "New source" from folder and set up a path to previously created parameter
4. As you can see it detects all the files in this folder, so make sure that this folder contains only a desired files. Yes, you can filter unnesessery files eg. when extenstion doesn't match, but I want to keep it simple.
5. For this example I will show you how to import Overview tables from folders, but it needed to be done for each sheet that you want to track. And also - it can be done by function so it will detect all the Sheets in the file and track them all but to see if that was what you wanted lets do it manualy only 2 of them: Overview and Milestone
6. I've renamed folders, parameters and functions here, because it will be easier to understand whats goin on.
7. In the "OverviewTransform SampleFile" table will add an index column so we can track changes for each row and do not lose this information.
8. In the "OverviewTransform SampleFile" table Select Index column and then Unpivot all other columns
9. In the "OverviewTransform SampleFile" table se should see something like this:
10. In Overview table we should see something like this:
So we have filename, index (row number in that file), columnname and value of that column.
11. Let's add a new custom column with a name of this table (Overview).
12. Done. No we need to repeat that to Milestone table.
- Import from folder based on folderPath parameter
- this time select Milestone sheet
- rename queries and parameters
- add index
- unpixot rest of the columns
- add custom column
13. We should see something like this:
14. Now we want to combine them into one table, so we are selecting Home > Appent Queries > As new
15. Select option that you want 3 or more tables and select tables to append
16. Right now we have such table
Source.Name: file names that information is coming from
SourceTable.Name: a table name from that file
Index: row index
ColumnName: business column name
Value: value of that column and index in that file
17. On the Overview and Milestone tables uncheck the "Unable load" option so we won't have duplicated information.
This post is getting too long so let me finish here and create a new answer how to viz it.
- 3 years ago
Step 1: Create 2 tables containing possible filter to files. Previously it Was 'Sample'Snapshot. Right now it's FilesTracker[Source.Name]
FileFilter_1 = GROUPBY(FilesTracker;FilesTracker[Source.Name])FileFilter_2 = GROUPBY(FilesTracker;FilesTracker[Source.Name])Step 1.1. (optional): I always want to write DAX in dedicated table so I've created a new calculated table DAX that holds everything.DAX = ROW("DAX";"DAX")
Step 2: Create a value measure for File1Value from file 1 =var selectedFile = VALUES(FileFilter_1[Source.Name])return CALCULATE(SELECTEDVALUE(FilesTracker[Value]);FILTER('FilesTracker';FilesTracker[Source.Name] in selectedFile))Step 3: Create a value measure for File2Value from file 2 =var selectedFile = VALUES(FileFilter_2[Source.Name])return CALCULATE(SELECTEDVALUE(FilesTracker[Value]);FILTER('FilesTracker';FilesTracker[Source.Name] in selectedFile))Step 4: Create a measure that defines if it's a change or notChanges detector = IF([Value from file 1]<>[Value from file 2];1;0)Step 5. Put up a filter on table to see only rows that has some changesStep 6. Put all filters on the page and viz it as you want 🙂
Final effect:
Hi FU,
I can't send long messages, so I'll put the instruction how to create a tooltip right here.
Create a new page. Let's call it: Tooltip.
Change the General settings on that page to be smaller than usual eg 400px x 600px in my case.
Add a visualisation that you want (in my example it was a table with column listed below). Note that "Flag" column is actually Changes detector measure from before, but it's also formated as a icon only.
Turn off the "Keep all filters" switch and put there an Index and SourceTable.Name field only.
At this step you should see something like this:
Come back to the first page and from Ribon open Sync slicers panel.
Click on the Source.Name slicer (FileFilter_1) and turn on the sync slicers like this:
So there is a sync between Sample and Tooltip page, but only on Sample page this slicer will be visible.
Do that same thing for Source.Name slicer (FileFilter_2), so both filters will be applyied on Tooltip page.
Click on the table witch detected changes, go to format options and then generals:
Turn On Tooltip section
Type: Report page
Page: Tooltip (or another name if you changed it before)
It should work 🙂