How do I push a Knowi dataset into Excel?
To push a Knowi dataset into Excel, you can
1. Go to Data > Get Data (Power Query) > Blank Query
2. Paste the following query and replace {apiKey} with your API key (found under your user settings) and {urlEncodedQueryName} with the url encoded version of your query name.
let Source = Csv.Document( Web.Contents( "https://www.knowi.com/api/data/{apiKey}?entityName={urlEncodedQueryName}&exportFormat=csv" ), [Delimiter = ",", Encoding = 65001] ), PromotedHeaders = Table.PromoteHeaders(Source, [PromoteAllScalars = true]), ChangedTypes = Table.TransformColumnTypes(PromotedHeaders, {}) in ChangedTypes
3. Click Next, then Close & load.
4. Under Data > Properties, configure the data refresh properties to refresh data when opening the file.
Please sign in to leave a comment.
0 comments