Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello Team,
We have Exporting the Audit logs into the SQL Database and We are trying to get the list of reports/datasets/dataflows/dashboards not being access for 180 days based on last creation time of the record, Activity type from the audit logs database.
Problem scenario
Your help will be appreciated!!
Table data
| DatasetName | WorkSpaceName | Earliest CreationTime max per DatasetName | Activity |
| Admin Tools _Original | Project Online PowerBI Reports | 9/6/2019 17:07 | DeleteDataset |
| Admin Tools 550 | Project PowerBI | 9/6/2019 17:07 | DeleteDataset |
| HR Dashboard | Analytics | 9/11/2019 19:43 | DeleteDataset |
| HR Dashboard V2 | Analytics | 9/10/2019 23:46 | DeleteDataset |
| HR Dashboard | Analytics | 9/11/2019 19:43 | ViewReport |
| HR Dashboard V2 | Analytics | 9/10/2019 23:46 | ViewReport |
| Admin Tools _Original | Project PowerBI | 9/6/2019 16:23 | ViewReport |
Expected Table data
| DatasetName | WorkSpaceName | Earliest CreationTime max per DatasetName | Activity |
| Admin Tools 550 | Project Online PowerBI Reports | 9/6/2019 17:07 | DeleteDataset |
Expected Table
Thank you
Solved! Go to Solution.
@Anonymous
You can see the names that no activity and more than 180 days until now with the following:
Column = IF(DATEDIFF([Earliest CreationTime max per DatasetName],TODAY(),DAY)>180 && [Activity]<>"DeleteDataset" && [Activity] <>"View Report", TRUE(),FALSE())
Then you can drag the columns into a table visual and filter with the this flag column to show the rows that matches the condition.
Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
You can see the names that no activity and more than 180 days until now with the following:
Column = IF(DATEDIFF([Earliest CreationTime max per DatasetName],TODAY(),DAY)>180 && [Activity]<>"DeleteDataset" && [Activity] <>"View Report", TRUE(),FALSE())
Then you can drag the columns into a table visual and filter with the this flag column to show the rows that matches the condition.
Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I did not get it completely. But you can have flag-like
flag = if(datediff( [Earliest CreationTime max per DatasetName], today(), day)>180 && [Activity]="DeleteDataset" ,1, 0)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!