Connecting to the NOMIS API in PowerBI

Office for National Statistics
Office for National StatisticsOffice for National Statistics

This guide was prepared by Suffolk County Council to support others in constructing their dashboards, using the NOMIS API through PowerBI.

Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023)
phc_analytics@suffolk.gov.uk
Connecting to the NOMIS API in Power BI
Introduction
Using the NOMIS API allows data to be updated automatically when the dataset is refreshed
in the Power BI Service or Power BI Desktop. The method described in this guide was initially
created with assistance from colleagues at Norfolk County Council.
Using the NOMIS website to get queries
Queries are compiled using the NOMIS website. This allows you to select variables of
interest and set parameters for data to download. Once you have made your selections,
choose the NOMIS API data format.
Click Download Data. From this screen, right-click on Link (data.csv) and copy this link.
Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023)
phc_analytics@suffolk.gov.uk
This link will be used as a query in Power BI Desktop to connect to the API. No API key is
required.
Using NOMIS queries in Power BI
In Power BI desktop, click ‘Get data’ then select the ‘Web’ source. Paste the copied URL (this
is known as the Query to the API) from the NOMIS website and click OK. Click Transform
data from the Preview window.
Once the query has been added, you may wish to use the formula bar or advanced editor to
remove the date parameter. This means your query will return data for all available dates.
To use Advanced Editor, click on the Home tab, then Advanced Editor.
Remove the part of the query that contains the word date. Delete everything from the start
of the word ‘date’ to the following ampersand (&). For example, in the query below, the text
highlighted in red would be deleted.
https://www.nomisweb.co.uk/api/v01/dataset/NM_17_5.data.csv?geography=1853882369
...1853882372,1853882374...1853882379&date=latest&variable=18,45,248,249,84,83,111,1
Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023)
phc_analytics@suffolk.gov.uk
487,1488,27,54,250,251,93,92,120,1489,1490,36,63,252,253,102,101,129,1491,1492,1532..
.1540,594,820,841,290,720...722,335,344&measures=20599,21001,21002,21003
If asked which credentials to use for this data source, select Anonymous credentials and
Public privacy level.
Transforming data for use in the report
To use the data to build reports in Power BI Desktop, transformations will need to be
applied. From the Transform tab, select Use first row as headers. Now that each column is
correctly labelled, only keep the columns that are required. This is good practice as it
reduces the size of the dataset. From the Home tab, click Choose Columns. The columns
that will usually be required are:
• DATE
• DATE_NAME
• GEOGRAPHY_NAME
• GEOGRAPHY_CODE
• GEOGRAPHY_TYPE
• VARIABLE_NAME
• VARIABLE_SORTORDER
• MEASURES_NAME
• OBS_VALUE
Next, pivot the MEASURES_NAME column to obtain a separate column for each measure.
That is, a column for the numerator, denominator and percentage (where applicable). Click
the MEASURES_NAME column, then click Pivot Column from the Transform tab. The values
column is OBS_VALUE. Under the Advanced options, select Don’t Aggregate for the
Aggregate Value Function.
Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023)
phc_analytics@suffolk.gov.uk
The MEASURES_NAME and OBS_VALUE columns of the table should have been replaced by
columns in the format below:
Further recommended transformations on this data (not detailed here) are:
• Renaming columns as appropriate.
• Changing data types for each column as appropriate.
• Dividing values in the Variable column by 100 to get data as a percentage.
Refreshing data
Queries to the NOMIS API will return the latest available data whenever they are refreshed.
This can include scheduled dataset refreshes in the Power BI service. When NOMIS are
updating the data in the API, the query will fail and any Power BI dataset including a query
to the NOMIS API refreshed during this period will fail. This is usually a temporary issue that
will be automatically resolved once NOMIS have finished updating the data in the API.
More information
https://www.nomisweb.co.uk/api/v01/help

Recomendados

Connecting to the StatXplore API in PowerBI von
Connecting to the StatXplore API in PowerBIConnecting to the StatXplore API in PowerBI
Connecting to the StatXplore API in PowerBIOffice for National Statistics
98 views22 Folien
ONS Local presents Suffolk County Council's Cost of Living Dashboard von
ONS Local presents Suffolk County Council's Cost of Living DashboardONS Local presents Suffolk County Council's Cost of Living Dashboard
ONS Local presents Suffolk County Council's Cost of Living DashboardOffice for National Statistics
176 views17 Folien
ONS Local and Data Science Community Workshop 1: How to use APIs von
ONS Local and Data Science Community Workshop 1: How to use APIsONS Local and Data Science Community Workshop 1: How to use APIs
ONS Local and Data Science Community Workshop 1: How to use APIsOffice for National Statistics
153 views13 Folien
Data science project presentation von
Data science project presentationData science project presentation
Data science project presentationKevin Bluer
1.4K views16 Folien
Understanding the cost of living through statistics von
Understanding the cost of living through statisticsUnderstanding the cost of living through statistics
Understanding the cost of living through statisticsOffice for National Statistics
665 views102 Folien
McKinsey Survey: Indian consumer sentiment during the coronavirus crisis von
McKinsey Survey: Indian consumer sentiment during the coronavirus crisisMcKinsey Survey: Indian consumer sentiment during the coronavirus crisis
McKinsey Survey: Indian consumer sentiment during the coronavirus crisisMcKinsey on Marketing & Sales
405 views31 Folien

Más contenido relacionado

Was ist angesagt?

ONS UK Climate Change Statistics Portal event von
ONS UK Climate Change Statistics Portal eventONS UK Climate Change Statistics Portal event
ONS UK Climate Change Statistics Portal eventOffice for National Statistics
126 views28 Folien
2022 COVID-19 Consumer Healthcare Insights-Feb 2022.pdf von
2022 COVID-19 Consumer Healthcare Insights-Feb 2022.pdf2022 COVID-19 Consumer Healthcare Insights-Feb 2022.pdf
2022 COVID-19 Consumer Healthcare Insights-Feb 2022.pdfMcKinsey on Healthcare
7.3K views13 Folien
D365 F&O - Data and Analytics White Paper von
D365 F&O - Data and Analytics White PaperD365 F&O - Data and Analytics White Paper
D365 F&O - Data and Analytics White PaperGina Pabalan
1.4K views16 Folien
Sales Analytics Using Power BI von
Sales Analytics Using Power BISales Analytics Using Power BI
Sales Analytics Using Power BINetwoven Inc.
2.5K views15 Folien
Reporte mensual de víctimas por homicidio doloso registradas en el municipio ... von
Reporte mensual de víctimas por homicidio doloso registradas en el municipio ...Reporte mensual de víctimas por homicidio doloso registradas en el municipio ...
Reporte mensual de víctimas por homicidio doloso registradas en el municipio ...IrapuatoCmovamos
1.1K views14 Folien
OBIEE 12c Advanced Analytic Functions von
OBIEE 12c Advanced Analytic FunctionsOBIEE 12c Advanced Analytic Functions
OBIEE 12c Advanced Analytic FunctionsMichael Perhats
4K views41 Folien

Was ist angesagt?(20)

D365 F&O - Data and Analytics White Paper von Gina Pabalan
D365 F&O - Data and Analytics White PaperD365 F&O - Data and Analytics White Paper
D365 F&O - Data and Analytics White Paper
Gina Pabalan1.4K views
Sales Analytics Using Power BI von Netwoven Inc.
Sales Analytics Using Power BISales Analytics Using Power BI
Sales Analytics Using Power BI
Netwoven Inc. 2.5K views
Reporte mensual de víctimas por homicidio doloso registradas en el municipio ... von IrapuatoCmovamos
Reporte mensual de víctimas por homicidio doloso registradas en el municipio ...Reporte mensual de víctimas por homicidio doloso registradas en el municipio ...
Reporte mensual de víctimas por homicidio doloso registradas en el municipio ...
IrapuatoCmovamos1.1K views
OBIEE 12c Advanced Analytic Functions von Michael Perhats
OBIEE 12c Advanced Analytic FunctionsOBIEE 12c Advanced Analytic Functions
OBIEE 12c Advanced Analytic Functions
Michael Perhats4K views
Value-based Healthcare today and tomorrow by Deloitte. von DayOne
Value-based Healthcare today and tomorrow by Deloitte.Value-based Healthcare today and tomorrow by Deloitte.
Value-based Healthcare today and tomorrow by Deloitte.
DayOne1K views
விண்வெளியும் கல்பனா சாவ்லாவும் கட்டுரை தமிழ்.pdf von GeethikaJ2
விண்வெளியும் கல்பனா சாவ்லாவும் கட்டுரை தமிழ்.pdfவிண்வெளியும் கல்பனா சாவ்லாவும் கட்டுரை தமிழ்.pdf
விண்வெளியும் கல்பனா சாவ்லாவும் கட்டுரை தமிழ்.pdf
GeethikaJ2413 views
Airbyte - Series-A deck von Airbyte
Airbyte - Series-A deckAirbyte - Series-A deck
Airbyte - Series-A deck
Airbyte602 views
Government at a Glance 2021, OECD Presentation von OECD Governance
Government at a Glance 2021, OECD Presentation Government at a Glance 2021, OECD Presentation
Government at a Glance 2021, OECD Presentation
OECD Governance60.6K views
project sentiment analysis von sneha penmetsa
project sentiment analysisproject sentiment analysis
project sentiment analysis
sneha penmetsa36.6K views
EY Price Point: global oil and gas market outlook von EY
EY Price Point: global oil and gas market outlookEY Price Point: global oil and gas market outlook
EY Price Point: global oil and gas market outlook
EY1.8K views
Self service BI overview + Power BI von Arthur Graus
Self service BI overview + Power BISelf service BI overview + Power BI
Self service BI overview + Power BI
Arthur Graus835 views
The Great Mobility Tech Race: Winning the battle for future profits von Boston Consulting Group
The Great Mobility Tech Race: Winning the battle for future profitsThe Great Mobility Tech Race: Winning the battle for future profits
The Great Mobility Tech Race: Winning the battle for future profits
EY Price Point: global oil and gas market outlook, Q2 April 2021 von EY
EY Price Point: global oil and gas market outlook, Q2 April 2021EY Price Point: global oil and gas market outlook, Q2 April 2021
EY Price Point: global oil and gas market outlook, Q2 April 2021
EY8.1K views

Similar a Connecting to the NOMIS API in PowerBI

Developing a ssrs report using a ssas data source von
Developing a ssrs report using a ssas data sourceDeveloping a ssrs report using a ssas data source
Developing a ssrs report using a ssas data sourcerelekarsushant
3.6K views32 Folien
JKJ_SSRS PPS Excel Services Project.Documentation von
JKJ_SSRS PPS Excel Services Project.DocumentationJKJ_SSRS PPS Excel Services Project.Documentation
JKJ_SSRS PPS Excel Services Project.DocumentationJeff Jacob
373 views31 Folien
William Schaffrans Bus Intelligence Portfolio von
William Schaffrans Bus Intelligence PortfolioWilliam Schaffrans Bus Intelligence Portfolio
William Schaffrans Bus Intelligence Portfoliowschaffr
241 views35 Folien
SSRS 2008 R2 von
SSRS 2008 R2SSRS 2008 R2
SSRS 2008 R2tomerl
2.5K views26 Folien
Informatica PowerAnalyzer 4.0 1 of 3 von
Informatica PowerAnalyzer 4.0 1 of 3Informatica PowerAnalyzer 4.0 1 of 3
Informatica PowerAnalyzer 4.0 1 of 3ganblues
2K views59 Folien
Oracle-Whitepaper-Optimizer-with-Oracle-Database-12c.pdf von
Oracle-Whitepaper-Optimizer-with-Oracle-Database-12c.pdfOracle-Whitepaper-Optimizer-with-Oracle-Database-12c.pdf
Oracle-Whitepaper-Optimizer-with-Oracle-Database-12c.pdfDetchDuvanGaelaCamar
2 views38 Folien

Similar a Connecting to the NOMIS API in PowerBI(20)

Developing a ssrs report using a ssas data source von relekarsushant
Developing a ssrs report using a ssas data sourceDeveloping a ssrs report using a ssas data source
Developing a ssrs report using a ssas data source
relekarsushant3.6K views
JKJ_SSRS PPS Excel Services Project.Documentation von Jeff Jacob
JKJ_SSRS PPS Excel Services Project.DocumentationJKJ_SSRS PPS Excel Services Project.Documentation
JKJ_SSRS PPS Excel Services Project.Documentation
Jeff Jacob373 views
William Schaffrans Bus Intelligence Portfolio von wschaffr
William Schaffrans Bus Intelligence PortfolioWilliam Schaffrans Bus Intelligence Portfolio
William Schaffrans Bus Intelligence Portfolio
wschaffr241 views
SSRS 2008 R2 von tomerl
SSRS 2008 R2SSRS 2008 R2
SSRS 2008 R2
tomerl2.5K views
Informatica PowerAnalyzer 4.0 1 of 3 von ganblues
Informatica PowerAnalyzer 4.0 1 of 3Informatica PowerAnalyzer 4.0 1 of 3
Informatica PowerAnalyzer 4.0 1 of 3
ganblues2K views
MS Bi Portfolio Gregory Lee von keeperx99
MS Bi Portfolio Gregory LeeMS Bi Portfolio Gregory Lee
MS Bi Portfolio Gregory Lee
keeperx99355 views
Ssis Ssas Ssrs Sp Pps Hong Bing Li von Hong-Bing Li
Ssis Ssas Ssrs Sp Pps Hong Bing LiSsis Ssas Ssrs Sp Pps Hong Bing Li
Ssis Ssas Ssrs Sp Pps Hong Bing Li
Hong-Bing Li949 views
SSIS_SSRS_PPS_SP_SSAS_Hong_Bing Li von Hong-Bing Li
SSIS_SSRS_PPS_SP_SSAS_Hong_Bing LiSSIS_SSRS_PPS_SP_SSAS_Hong_Bing Li
SSIS_SSRS_PPS_SP_SSAS_Hong_Bing Li
Hong-Bing Li274 views
C:\fakepath\ssis ssas sssrs_pps_hong_bingli_v2003 von Hong-Bing Li
C:\fakepath\ssis ssas sssrs_pps_hong_bingli_v2003C:\fakepath\ssis ssas sssrs_pps_hong_bingli_v2003
C:\fakepath\ssis ssas sssrs_pps_hong_bingli_v2003
Hong-Bing Li271 views
Kevin Fahy Bi Portfolio von KevinPFahy
Kevin Fahy   Bi PortfolioKevin Fahy   Bi Portfolio
Kevin Fahy Bi Portfolio
KevinPFahy488 views
Tony Von Gusmann & MS BI von vongusmann
Tony Von Gusmann & MS BITony Von Gusmann & MS BI
Tony Von Gusmann & MS BI
vongusmann691 views
Cognos framework manager von maxonlinetr
Cognos framework managerCognos framework manager
Cognos framework manager
maxonlinetr619 views
6 bosch rexroth_eng_01 von vanclea2004
6 bosch rexroth_eng_016 bosch rexroth_eng_01
6 bosch rexroth_eng_01
vanclea2004241 views
Optimizing Queries over Partitioned Tables in MPP Systems von EMC
Optimizing Queries over Partitioned Tables in MPP SystemsOptimizing Queries over Partitioned Tables in MPP Systems
Optimizing Queries over Partitioned Tables in MPP Systems
EMC1.4K views
SSIS_SSAS_SSRS_SP_PPS_HongBingLi von Hong-Bing Li
SSIS_SSAS_SSRS_SP_PPS_HongBingLiSSIS_SSAS_SSRS_SP_PPS_HongBingLi
SSIS_SSAS_SSRS_SP_PPS_HongBingLi
Hong-Bing Li412 views
10400_SGF_DDPO_Final_03_21_2016 von Sachin Verma
10400_SGF_DDPO_Final_03_21_201610400_SGF_DDPO_Final_03_21_2016
10400_SGF_DDPO_Final_03_21_2016
Sachin Verma93 views
CREATING A DATASET FROM EXCEL IN POWER BI REPORT BUILDER von SagarDuttPhuloria
CREATING A DATASET FROM EXCEL IN POWER BI REPORT BUILDERCREATING A DATASET FROM EXCEL IN POWER BI REPORT BUILDER
CREATING A DATASET FROM EXCEL IN POWER BI REPORT BUILDER
SagarDuttPhuloria152 views

Más de Office for National Statistics

SlideShare ONS Economic Forum Slidepack - 13 November 2023 von
SlideShare ONS Economic Forum Slidepack - 13 November 2023SlideShare ONS Economic Forum Slidepack - 13 November 2023
SlideShare ONS Economic Forum Slidepack - 13 November 2023Office for National Statistics
67 views40 Folien
SlideShare ONS Economic Forum Slidepack - 16 October 2023 von
SlideShare ONS Economic Forum Slidepack - 16 October 2023SlideShare ONS Economic Forum Slidepack - 16 October 2023
SlideShare ONS Economic Forum Slidepack - 16 October 2023Office for National Statistics
8 views36 Folien
So what does ‘Beyond GDP’ mean for the UK – 12 October 2023 von
So what does ‘Beyond GDP’ mean for the UK – 12 October 2023So what does ‘Beyond GDP’ mean for the UK – 12 October 2023
So what does ‘Beyond GDP’ mean for the UK – 12 October 2023Office for National Statistics
158 views37 Folien
GDP after 2025: updating national accounts and balance of payments – 11 Octob... von
GDP after 2025: updating national accounts and balance of payments – 11 Octob...GDP after 2025: updating national accounts and balance of payments – 11 Octob...
GDP after 2025: updating national accounts and balance of payments – 11 Octob...Office for National Statistics
145 views66 Folien
SlideShare Measuring the Economy Slidepack - 29 September 2023 von
SlideShare Measuring the Economy Slidepack - 29 September 2023SlideShare Measuring the Economy Slidepack - 29 September 2023
SlideShare Measuring the Economy Slidepack - 29 September 2023Office for National Statistics
93 views23 Folien

Más de Office for National Statistics(20)

Último

COP 28 GHANA DELEGATES.docx von
COP 28 GHANA DELEGATES.docxCOP 28 GHANA DELEGATES.docx
COP 28 GHANA DELEGATES.docxKweku Zurek
5.8K views23 Folien
Dr Getaw Tadesse - 2023 ReSAKSS Conference .pptx von
Dr Getaw Tadesse - 2023 ReSAKSS Conference .pptxDr Getaw Tadesse - 2023 ReSAKSS Conference .pptx
Dr Getaw Tadesse - 2023 ReSAKSS Conference .pptxAKADEMIYA2063
13 views19 Folien
UAE's 52nd National Day, 2023 von
UAE's 52nd National Day, 2023UAE's 52nd National Day, 2023
UAE's 52nd National Day, 2023sri24ram2024
6 views58 Folien
Support Girl students with Education von
Support Girl students with EducationSupport Girl students with Education
Support Girl students with EducationSERUDS INDIA
6 views6 Folien
ΕΚΘΕΣΗ ΚΟΜΙΣΙΟΝ ΓΙΑ ΤΟΥΡΚΙΑ von
ΕΚΘΕΣΗ ΚΟΜΙΣΙΟΝ ΓΙΑ ΤΟΥΡΚΙΑΕΚΘΕΣΗ ΚΟΜΙΣΙΟΝ ΓΙΑ ΤΟΥΡΚΙΑ
ΕΚΘΕΣΗ ΚΟΜΙΣΙΟΝ ΓΙΑ ΤΟΥΡΚΙΑssuser9e6212
172 views18 Folien
Dr. John Ulimwengu - 2023 ReSAKSS Conference.pptx von
Dr. John Ulimwengu - 2023 ReSAKSS Conference.pptxDr. John Ulimwengu - 2023 ReSAKSS Conference.pptx
Dr. John Ulimwengu - 2023 ReSAKSS Conference.pptxAKADEMIYA2063
6 views9 Folien

Último(20)

COP 28 GHANA DELEGATES.docx von Kweku Zurek
COP 28 GHANA DELEGATES.docxCOP 28 GHANA DELEGATES.docx
COP 28 GHANA DELEGATES.docx
Kweku Zurek5.8K views
Dr Getaw Tadesse - 2023 ReSAKSS Conference .pptx von AKADEMIYA2063
Dr Getaw Tadesse - 2023 ReSAKSS Conference .pptxDr Getaw Tadesse - 2023 ReSAKSS Conference .pptx
Dr Getaw Tadesse - 2023 ReSAKSS Conference .pptx
AKADEMIYA206313 views
UAE's 52nd National Day, 2023 von sri24ram2024
UAE's 52nd National Day, 2023UAE's 52nd National Day, 2023
UAE's 52nd National Day, 2023
sri24ram20246 views
Support Girl students with Education von SERUDS INDIA
Support Girl students with EducationSupport Girl students with Education
Support Girl students with Education
SERUDS INDIA6 views
ΕΚΘΕΣΗ ΚΟΜΙΣΙΟΝ ΓΙΑ ΤΟΥΡΚΙΑ von ssuser9e6212
ΕΚΘΕΣΗ ΚΟΜΙΣΙΟΝ ΓΙΑ ΤΟΥΡΚΙΑΕΚΘΕΣΗ ΚΟΜΙΣΙΟΝ ΓΙΑ ΤΟΥΡΚΙΑ
ΕΚΘΕΣΗ ΚΟΜΙΣΙΟΝ ΓΙΑ ΤΟΥΡΚΙΑ
ssuser9e6212172 views
Dr. John Ulimwengu - 2023 ReSAKSS Conference.pptx von AKADEMIYA2063
Dr. John Ulimwengu - 2023 ReSAKSS Conference.pptxDr. John Ulimwengu - 2023 ReSAKSS Conference.pptx
Dr. John Ulimwengu - 2023 ReSAKSS Conference.pptx
AKADEMIYA20636 views
Dr. Fleur Wouterse - 2023 ReSAKSS Conference.pptx von AKADEMIYA2063
Dr. Fleur Wouterse - 2023 ReSAKSS Conference.pptxDr. Fleur Wouterse - 2023 ReSAKSS Conference.pptx
Dr. Fleur Wouterse - 2023 ReSAKSS Conference.pptx
AKADEMIYA20637 views
Ms. Julie Collins - 2023 ReSAKSS Conference.pptx von AKADEMIYA2063
Ms. Julie Collins - 2023 ReSAKSS Conference.pptxMs. Julie Collins - 2023 ReSAKSS Conference.pptx
Ms. Julie Collins - 2023 ReSAKSS Conference.pptx
AKADEMIYA206317 views
Dr Jean Paul Latyr FAYE - 2023 ReSAKSS Conference.pptx von AKADEMIYA2063
Dr Jean Paul Latyr FAYE - 2023 ReSAKSS Conference.pptxDr Jean Paul Latyr FAYE - 2023 ReSAKSS Conference.pptx
Dr Jean Paul Latyr FAYE - 2023 ReSAKSS Conference.pptx
AKADEMIYA20639 views
Dr. Ousmane Badiane - 2023 ReSAKSS Conference.pptx von AKADEMIYA2063
Dr. Ousmane Badiane - 2023 ReSAKSS Conference.pptxDr. Ousmane Badiane - 2023 ReSAKSS Conference.pptx
Dr. Ousmane Badiane - 2023 ReSAKSS Conference.pptx
AKADEMIYA206328 views
Financial sustainability of schemes managed by PHED in Punjab_Krishnakumar Th... von India Water Portal
Financial sustainability of schemes managed by PHED in Punjab_Krishnakumar Th...Financial sustainability of schemes managed by PHED in Punjab_Krishnakumar Th...
Financial sustainability of schemes managed by PHED in Punjab_Krishnakumar Th...
Managing drinking water infrastructure in West Bengal Gram Panchayats_Sujata ... von India Water Portal
Managing drinking water infrastructure in West Bengal Gram Panchayats_Sujata ...Managing drinking water infrastructure in West Bengal Gram Panchayats_Sujata ...
Managing drinking water infrastructure in West Bengal Gram Panchayats_Sujata ...
Case study of Gokarna Multi-village scheme, Kumta, Karnataka_IIM-B_2023.pdf von India Water Portal
Case study of Gokarna Multi-village scheme, Kumta, Karnataka_IIM-B_2023.pdfCase study of Gokarna Multi-village scheme, Kumta, Karnataka_IIM-B_2023.pdf
Case study of Gokarna Multi-village scheme, Kumta, Karnataka_IIM-B_2023.pdf

Connecting to the NOMIS API in PowerBI

  • 1. Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023) phc_analytics@suffolk.gov.uk Connecting to the NOMIS API in Power BI Introduction Using the NOMIS API allows data to be updated automatically when the dataset is refreshed in the Power BI Service or Power BI Desktop. The method described in this guide was initially created with assistance from colleagues at Norfolk County Council. Using the NOMIS website to get queries Queries are compiled using the NOMIS website. This allows you to select variables of interest and set parameters for data to download. Once you have made your selections, choose the NOMIS API data format. Click Download Data. From this screen, right-click on Link (data.csv) and copy this link.
  • 2. Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023) phc_analytics@suffolk.gov.uk This link will be used as a query in Power BI Desktop to connect to the API. No API key is required. Using NOMIS queries in Power BI In Power BI desktop, click ‘Get data’ then select the ‘Web’ source. Paste the copied URL (this is known as the Query to the API) from the NOMIS website and click OK. Click Transform data from the Preview window. Once the query has been added, you may wish to use the formula bar or advanced editor to remove the date parameter. This means your query will return data for all available dates. To use Advanced Editor, click on the Home tab, then Advanced Editor. Remove the part of the query that contains the word date. Delete everything from the start of the word ‘date’ to the following ampersand (&). For example, in the query below, the text highlighted in red would be deleted. https://www.nomisweb.co.uk/api/v01/dataset/NM_17_5.data.csv?geography=1853882369 ...1853882372,1853882374...1853882379&date=latest&variable=18,45,248,249,84,83,111,1
  • 3. Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023) phc_analytics@suffolk.gov.uk 487,1488,27,54,250,251,93,92,120,1489,1490,36,63,252,253,102,101,129,1491,1492,1532.. .1540,594,820,841,290,720...722,335,344&measures=20599,21001,21002,21003 If asked which credentials to use for this data source, select Anonymous credentials and Public privacy level. Transforming data for use in the report To use the data to build reports in Power BI Desktop, transformations will need to be applied. From the Transform tab, select Use first row as headers. Now that each column is correctly labelled, only keep the columns that are required. This is good practice as it reduces the size of the dataset. From the Home tab, click Choose Columns. The columns that will usually be required are: • DATE • DATE_NAME • GEOGRAPHY_NAME • GEOGRAPHY_CODE • GEOGRAPHY_TYPE • VARIABLE_NAME • VARIABLE_SORTORDER • MEASURES_NAME • OBS_VALUE Next, pivot the MEASURES_NAME column to obtain a separate column for each measure. That is, a column for the numerator, denominator and percentage (where applicable). Click the MEASURES_NAME column, then click Pivot Column from the Transform tab. The values column is OBS_VALUE. Under the Advanced options, select Don’t Aggregate for the Aggregate Value Function.
  • 4. Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023) phc_analytics@suffolk.gov.uk The MEASURES_NAME and OBS_VALUE columns of the table should have been replaced by columns in the format below: Further recommended transformations on this data (not detailed here) are: • Renaming columns as appropriate. • Changing data types for each column as appropriate. • Dividing values in the Variable column by 100 to get data as a percentage. Refreshing data Queries to the NOMIS API will return the latest available data whenever they are refreshed. This can include scheduled dataset refreshes in the Power BI service. When NOMIS are updating the data in the API, the query will fail and any Power BI dataset including a query to the NOMIS API refreshed during this period will fail. This is usually a temporary issue that will be automatically resolved once NOMIS have finished updating the data in the API. More information https://www.nomisweb.co.uk/api/v01/help