Extracting data from Cosmos DB
Analytics data can be extracted from Cosmos DB into Power BI by following these steps:
- Open Power BI and search for an Azure Cosmos DB connection:
- Fill in the connection details
When prompted add your access key
Choose to edit query – then click this icon, which will create a new data set.
- Add the following columns to this new data set – then close and apply.
#datetime(1970, 1, 1, 0, 0, 0) + #duration(0, 0, 0, [Document._ts])
Time.Hour(DateTime.Time([LoggedDT]))
More information can be found here: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/powerbi-visualize