If you’re like me and only use the Dropbox web interface and no synchronised folders, trying to find out where your space is being used is hard. As far as I can see the Dropbox interface doesn’t provide any tools to help with this.
BUT! Dropbox has an API and Power BI can consume data from web APIs!
So the simple answer is to point Power BI at your Dropbox folder and let it do the analysis.
This Power BI report does just that! It uses a treemap to show where space is used and has all kinds of nice functions like:
- Showing file sizes in various units or file counts
- Showing stats for each folder on its own or including all subfolders
- Restricting to any selected folder (and optionally its subfolders)
- Filtering by file extension
- A hover tooltip visual over the treemap to show information about a folder in the tree map
- Click on a folder to see the file list for that folder, or drill through to a larger view of the same file list
Here’s what it looks like for my test account:
To use the report for your own Dropbox account, all you need to do is get an access token from your Dropbox account and paste it into the report …
- Download the report from my GitHub and open it in Power BI (it won’t refresh because needs a valid access token for your Dropbox account)
- Log into your Dropbox account to get your access token for the API call
To do this after logging in to Dropbox, go to https://www.dropbox.com/developers
Click on API Explorer which takes you here: https://dropbox.github.io/dropbox-api-v2-explorer/
Scroll down the left hand side and click list_folder which takes you here: https://dropbox.github.io/dropbox-api-v2-explorer/#files_list_folder
Click “Get token” and copy the full access token from the box
- In the Power BI report, Edit Queries, select Query1 and Source (NOT the cog for the source settings!), then the down arrow to show multiple lines of the query source. You have to make this change in the code as shown – DO NOT click the cog to edit the query source properties! The UI for editing web API data sources in Power BI is overly simplified and does not allow full editing of richer API calls like this one.
Scroll down until you see #”Authorization”=”Bearer PASTE_YOUR_ACCESS_TOKEN_HERE” and replace the PASTE_… text with the token you copied in step 2.
Close and apply your changes
You should now see your own Dropbox information.