Power Query Excel 2016
Power Query Excel 2016
Version 1.0.1
09 Jun 2017
data_feed_power_query_technical_user_guide_(cs-p-en-010015-1.0.1)
Data Feed Power Query - Technical User Guide, version 1.0.1 Page 1 of 10
data_feed_power_query_technical_user_guide_(cs-p-en- 09 Jun 2017
010015-1.0.1), Public
Table of Contents
Introduction ............................................................................................................................................. 3
Set-up customised data feed .................................................................................................................. 3
Technical requirements for Data Feed Power Query .............................................................................. 4
Build Power Query based on a data feed ............................................................................................... 5
Introduction - Demo Power Query ............................................................................................... 5
Create new Power Query from scratch based on a data feed ..................................................... 5
Error handling ......................................................................................................................................... 8
‘Power Query’ tab not visible after successful download of Add-In (Excel 2010 / 2013) ............. 8
Add New Query - ’MYSHEET’ shows no results (Excel 2010 / 2013 / 2016) .............................. 8
‘MYSHEET’ shows no result after adjusting data feed and refreshing query ‘SOURCE’ ............ 8
Revision History .................................................................................................................................... 10
Contact information ............................................................................................................................... 10
Data Feed Power Query - Technical User Guide, version 1.0.1 Page 2 of 10
data_feed_power_query_technical_user_guide_(cs-p-en- 09 Jun 2017
010015-1.0.1), Public
Introduction
This manual explains how to create a customised data feed in order to extract data from
fundinfo’s database. Additionally, it goes through each step how to build a Power Query based
on a data feed.
Go to https://datafeed.fundinfo.com/
You will arrive at the ‘Home’ section
Click ‘Login’ on the upper right to log yourself in or register
After a successful login the home page will appear
Select ‘Feeds’ tab
Hit ‘Create’
Enter a name at the ‘Name’ field
Click ‘Create’
Page 1: Specifying data scope
On this page, you may apply filters to the selected data of a feed. This feed configuration is
optional. The filter(s) will directly influence the feed’s output. Please keep in mind that in case
your data feed is empty, it might be the case that one of the applied filters excludes any kind of
results. The already existing filter ‘Share Class Lifecycle Filter (OFST020545)’ is applied to
every feed by default. It instructs the system to show only data of active share classes/funds.
Click create
Select a ‘Filter Type’ from the drop-down menu. Please note that for the time being the
filter types are restricted to a specific field range.
Define the ‘Filter Parameters’
Hit ‘OK’
Data Feed Power Query - Technical User Guide, version 1.0.1 Page 3 of 10
data_feed_power_query_technical_user_guide_(cs-p-en- 09 Jun 2017
010015-1.0.1), Public
Page 3: Formatting the output
Should you wish to get an email notification once the data feed is ready, tick ‘Email
Notification, when new data feed was generated’
Hit ‘Save’ -> data will be produced as stated above ‘Page 1: Specifying data scope’
In order to perform Power Queries in one of the Excel Versions 2010 or 2013 we kindly ask you
to download the Add-In: ‘Microsoft Power Query for Excel’ and follow the installation steps:
https://www.microsoft.com/en-us/download/details.aspx?id=39379&CorrelationId=e3b43710-
403a-49af-9027-09eddbc7472b
After a successful installation: reopen Excel. You should now be able to see a new tab called ‘Power
Query’ (see screenshot).
Data Feed Power Query - Technical User Guide, version 1.0.1 Page 4 of 10
data_feed_power_query_technical_user_guide_(cs-p-en- 09 Jun 2017
010015-1.0.1), Public
Build Power Query based on a data feed
https://about.fundinfo.com/media/2088/datafeed-powerquery_demo_office-2016_cs-p-en-010017.xlsx
https://about.fundinfo.com/media/2087/datafeed-powerquery_demo_office-2010_2013_cs-p-en-
010016.xlsx
Open the demo file and you may find one visible sheet ‘MYSHEET’. This sheet will show data based
on a data feed, which works as a source. The source sheet is hidden. To unhide the sheet:
In ‘MYSHEET’ the ISIN is the share class trigger (column A) and the openfunds identifier codes
represent the data fields (row 1). The Power Query can only display data for those fields and ISINs,
which have been previously added to the data feed. The data will be updated directly from fundinfo’s
database on a periodical basis as defined in the data feed.
The demo file gives you a preview of what and how a Power Query provides data. Further, it gives a
small insight of the visual format. It should not work as a Power Query Template. Please find below
instructions to build-up your own customised Power Query.
4. A window will pop up and ask you for an URL -> leave it open
5. Go back to your feed overview on https://datafeed.fundinfo.com/
6. Select the data feed you wish to use as basis for the Power Query (Tip: Your data feed should
include the data field ‘ISIN [OFST020000]’ and it should be selected as first field. This will force
Data Feed Power Query - Technical User Guide, version 1.0.1 Page 5 of 10
data_feed_power_query_technical_user_guide_(cs-p-en- 09 Jun 2017
010015-1.0.1), Public
the application to list the ISIN in the first column of the data feed and will come in handy later
on.)
7. Go to the third page and right click on the API address of the CSV file -> click ‘copy link
address’
8. Go back to the open window within Excel and paste the copied link -> hit ‘OK’
9. A message box appears, asking if the access should be anonymous. Choose either one of the
options and click ‘Connect’.
10. This step only concerns the users of Excel Version 2010, 2013 OR Excel Version 2016 (with
version number above 16.0.4266.1001):
After successful connection another message box will pop-up providing a preview of
extracted data.
Hit ‘Edit’ on the bottom right
11. A new window will pop-up, the Query Editor:
12. Within the Query Editor: Select the first row with all OFST identifier -> Within the group
‘Transform’, click ‘Use First Row As Headers’ -> within the group ‘Close’, click ‘Close & Load’
13. In case the first column of your feed is the ISIN [OFST020000] field this step is irrelevant.
Otherwise, still in the Query Editor: Please make sure that the column listing all ISINs (OFST
identifier: OFST020000) will be the first column within query -> drag and drop it to the first
position (Note: This reordering is not dynamically and in case you will adjust your data field
range of the data feed afterwards, this may lead to an error. Please see chapter 5 ‘Error
handling’ point 1.3 for further details.)
14. Excel automatically creates a second sheet within the excel workbook to use it for the query
15. Name the query sheet ‘SOURCE’ (take demo file as reference)
16. Name the empty sheet ‘MYSHEET’ (take demo file as reference)
17. Within the ‘Power Query’ sheet: As explained above Column A receives ISIN codes as share
class trigger, row 1 is supposed to contain the OFST identifier to represent each data field
-> add the ISIN OFST identifier OFST020000 at cell A1
18. Create the following formula in ‘MYSHEET’ to extract data from ‘SOURCE’. Start at cell B2 in
‘MYSHEET’:
a. The ISIN will be the unique identifier of the share class in column A returning the
respective data point listed in the ‘SOURCE’ sheet (query).
Lookup_value: entered ISIN in column A, add the following: $A2 ($ sign in
order to assure the reference stays in column A)
Data Feed Power Query - Technical User Guide, version 1.0.1 Page 6 of 10
data_feed_power_query_technical_user_guide_(cs-p-en- 09 Jun 2017
010015-1.0.1), Public
Table_array: column range of ‘SOURCE’ sheet, depends on amount of
fields included into the data feed, also add ‘$’ sign (e.g.:
‘SOURCE’!$A:$D). Please note that in case you subsequently
extend the data field scope, the table array has to be adjusted
accordingly as well.
Col_index_num: set to 1
[range_lookup]: set to FALSE
b. In order to avoid ‘#N/A’ results, add the ‘IFERROR’ formula. Use “” (two quotation
marks with no space in between) as the value to be shown if the error occurs.
Value_if_error: “”
c. To show the respective data point according to the given OFST identifiers replace
‘Col_index_num’ of the VLOOKUP formula with the MATCH formula:
Lookup_value: is the OFST identifier in row 1, add the following: B$1 ($ sign
in order to assure the reference stays in the first row)
Lookup_array: first row of the ‘Source’ sheet e.g.: ‘SOURCE’!$1:$1
[match_type]: 0 - exact match
19. After successful creation of the formula, multiply it into as many cells as you need except for
those in row 1 and column A.
20. To refresh the data of the query -> right-click on any cell in the ‘SOURCE’ sheet -> select
‘Refresh’ from dropdown OR select ‘SOURCE’ sheet -> click on ‘Query’ tab within the ribbon ->
hit ‘Refresh’
Data Feed Power Query - Technical User Guide, version 1.0.1 Page 7 of 10
data_feed_power_query_technical_user_guide_(cs-p-en- 09 Jun 2017
010015-1.0.1), Public
Error handling
Power Query tab not visible after successful download of Add-In (Excel 2010 /
2013)
Please check your Add-In settings:
Go to ’File’ tab
Click ‘Options’ -> then ‘Add-Ins’ category
On the bottom choose ‘COM Add-In’ from the dropdown right next to ‘Manage’ -> click ‘Go’
Make sure the ‘Microsoft Power Query for Excel’ is ticked
Click ‘OK’
Add new query - ’MYSHEET’ shows no results (Excel 2010 / 2013 / 2016)
In case you would like to add a new data feed to the Power Query and replace it with the original
‘SOURCE’ and the ‘MYSHEET’ does not return any results, it might be because of the formula. When
adding a new query, Excel will automatically create a new sheet. Deleting the original ‘SOURCE’
sheet and renaming the new query to ‘SOURCE’ will destroy the reference within the formula. It turns
out the ‘MYSHEET’ does not return any values from the new query. To solve this, do the following:
Go to ‘MYSHEET’
Double click cell B2 to edit the formula
You will see twice ‘ #REF ‘ for the values:
table_array of VLOOKUP
lookup_array of MATCH
Replace ‘ #REF ‘ with the correct reference as explained in chapter ‘4.2. Create new Power
Query based on Data Feed’ at step 18a and 18c
Fixed formula should look similar to this:
‘MYSHEET’ shows no result after adjusting data feed and refreshing query
‘SOURCE’
Should you adjust the data field scope of the data feed you are using for the Power Query by adding
or removing a data field, please be aware of the following:
After successfully adjusting your feed and refreshing the query ‘SOURCE’ within the Power Query it
might be the case that ‘MYSHEET’ no longer shows any results. This may be because of the fact that
the reordering of the feeds column as described in point 4.1.2 step 12 to 13 is not dynamically.
Data Feed Power Query - Technical User Guide, version 1.0.1 Page 8 of 10
data_feed_power_query_technical_user_guide_(cs-p-en- 09 Jun 2017
010015-1.0.1), Public
Adding a new data field:
This does not trigger an issue as all new added fields are added-up on the end of the ‘Select data
fields’ dropdown field and will not influence the query settings.
Removing a field:
If you remove a field from the dropdown list, which is in terms of the fields order before the ISIN field,
the ISIN field will move one index to the left and will no longer have its same position, which triggers
the error in the Power Query. You either re-build the Power Query from the scratch or deselect all data
fields and re-select them while making sure the ISIN field will be at its previous position as the query
settings will expect. Removing a data field behind the ISIN field should not cause an error.
Data Feed Power Query - Technical User Guide, version 1.0.1 Page 9 of 10
data_feed_power_query_technical_user_guide_(cs-p-en- 09 Jun 2017
010015-1.0.1), Public
Revision History
Contact information
fundinfo AG Office Hours Switzerland:
Staffelstrasse 12 08:30 – 17:30 UTC +1 (daylight saving: UTC +2)
8045 Zürich Phone +41 44 286 91 02
Switzerland For Fund Houses: [email protected]
For Fund Distributors: [email protected]
Disclaimer:
The contents of this document are provided “as is”. This information may contain technical
inaccuracies, typographical errors or out-of-date information and may be updated or changed without
notice at any time. In no event shall fundinfo be liable for special, indirect, incidental or consequential
damages resulting from or related to the use of this document.
Data Feed Power Query - Technical User Guide, version 1.0.1 Page 10 of 10
data_feed_power_query_technical_user_guide_(cs-p-en- 09 Jun 2017
010015-1.0.1), Public