Data Input Table

Auditing

11min

All events like modifying, adding and deleting in a Data Input Table will be recorded and stored in an audit table. The audit data can be viewed in Power BI by showing data from the audit view or you can view the data in the Portal.

View audit data in the Portal

Go to the Storage Table and chose the table you want to examine. Click on Datain the toolbar. On the top right toolbar button you have an Audit button. When you click on the button a calendar will popup.



Document image


Days in the calendar that have any events is marked with a dot below the day

Document image


When you click on a day, you will see the times on the right which shows all events that have occured on that day.



Document image


By clicking on a time, the grid will show you how the data looked like at that point.



Document image


On the Audit button, you can see on which day you are looking at. Two new columns are also added at the end of each row which contains the date when the actual value expires and the last action that was done on the row. The actions can be Insertor Update. If a row is deleted, it's marked with red but the action still show the last action that was done on the row as showed in row 1 and 3 in the image above.

In the image above, the first row is deleted (marked in red) and the value was deleted 2024-10-15 08:39:10 by user 26. The last row, Key 30 with value "CCCCC" is valid until 2024-10-17 14:08:29 when someone edited or deleted the value.

To see what's happend to Key 30 value "CCCCCC" you can simply click on the date and the grid will take you to the date when the values was changed.



Document image


When clicked on Key 30, you can see that the Comment was updated by user 26. This value was changed 2024-10-17 14:08:27 and is valid to 2024-10-17 14:10:14, so if we click on that date you will see that the Key 30 was deleted.

Navigation

When you click on the dates, the browser history will be updated which means that you can go back to previous date by clicking on the "Back" in your browser. In the same way, you can click "Forward" to jump forward. This is also means that you can copy the actual address in the address bar in your browser and it send it to a co-worker. The link will open the grid on the date you have selected.

Filtering values

When you trace the history, you often are interested of a special key like Item, Account, Department etc. If you filter the grid, the audit also is filtered so you will only see the dates when something happens for the active filter. Here is an example, as you can see we have a lot of dates of changing values when the grid is unfiltered:



Document image


You may wondering what happens with Key=20 since it's not in the grid anymore. Click on the Filter symbol on the Key column and enter 20.



Document image


Of course the grid now will be empty (the Key=20 doesn't currently exist) but if you click on Audit you can see it's some records that has something to do with Key = 20. If you want to know who deleted it, well it must the last event that occured October 16. Click on 16 in the Calendar and click on the last time in the list to the right (in this case it only was one event this day).



Document image


You can now see that User 26 deleted the record.

Deleted values

If you navigate by clicking on a date you may come to where someone has deleted the row. This will end the trace and you cannot click on the date anymore. Anyway, the value can exist after that, if someone has created the value again. Here is an example and how you can navigate:

We start by filtering out Key = 20 so it's easier to follow. Filtering is explained above. We click on Audit and choose the first time.



Document image


We click on the Valid To date.



Document image


We click again and come to a deleted row.



Document image


Now we can't click no more but if we open the Audit again we can see where we currently are but we can also see there is more event after this. One event today and even more 15th and 16th.



Document image


If we click on the last time we will see that the 20 lives again which means that User 26 created Key=20 at this point again.

Go Live

In the Audit menu, you have a button Go Live , when you click on this button, the grid will show the current data that is stored in the database.

Select Rows

You can select row(s) by clicking on the checkboxes on the beginning of each row. This may help you keep track of rows you are searching for when you navigating between dates.

The Audit button is not visible

The Audit button may be invisible. This can happen if the Storage Table type doesn't support temporal table or there is no temporal table available.

Storage Tables, Fact Tables, Comment Table and Status Tables cannot be audited in the Portal. This is because of the way the transactions are handled for those tables. Dimension Tables and Other Tables are valid for auditing and the audit table is created when you process the table. With that said, old tables that were processed before the audit was introduced will not have any audit table. To fix that, you will need to re-process the table:

Go to the storage table and change something and change it back so the Save button is enabled, click on Save and then Process. When the process is finished you can click on the Data menu and the Audit button will be showed. All rows are now treated as new and valid. From now the audit mechanism will trace all changes in the table.

Restrictions

When you audit data, you cannot remove data from the grid. You must be in Live view to delete data.

Auditing in Power BI

In Power BI, you have a view called <TableName>_audit which will list all changes done in the table.