To main content

Save your search in the Statistical Database

Here we describe step by step how you can easily return to the search you made in the Statistical Database. You receive the retrieval exactly as you have formulated it and in the format that you saved it.

Step 1: Make a retrieval and change it

Search for a table

Search for a table, such as Population by region, marital status, age and sex. Select variables and years, for instance Population in Stockholm and Norbotten Counties 2015 - 2017.

For help with retrievals, see How to make a table from the Statistical Database (pdf)

By clicking "Edit and Calculate" you can choose and  "pivot clockwise" to make years as row headings instead.

Table of population in Stockholm and Norrbotten 2015-2017

When you are satisfied with your retrieval and would like to save it for later, or would like to share it, click on Save your retrieval.

Save your retrieval

Step 2: Choose alternatives on how time should be updated in your search.

When you have chosen to save your search, you have three alternatives for how the time period should be displayed the next time you run your search. In this example we assume that new information for 2014 is available since you last saved the search.

Alternative 1: Show the same search and add new time periods - Fixed starting time

With this alternative, new years are added to our table. 2015 remains as the starting time and the time period 2015 - 2018 will be shown the next time your search is made.

http://www.statistikdatabasen.scb.se/sq/70066

 Table of population in Stockholm and Norrbotten 2015-2018

Alternative 2: Show the same number of time periods and update with new times - Rolling starting time

With this alternative, new years are added but not as many years are shown as in our first search (4 years in the example). 2016 will be a new starting time in the table the next time the search runs and the time period 2016 - 2018 will be shown.

http://www.statistikdatabasen.scb.se/sq/70067

Table of population in Stockholm and Norrbotten 2016-2018

Alternative 3: Show the same search again

With this alternative no updated time periods are shown and the tables look the same as in the searches we made. The time period is the same, 2015 - 2017.

http://www.statistikdatabasen.scb.se/sq/70073

Table of population in Stockholm and Norrbotten 2015-2017

Step 3: Choose the format for your search

When you have chosen how your search should be updated, you need to choose the format you want the next time you run your search.

List of different format for your search

In this example we choose what is shown on the screen and finish our search.

Step 4: Saving the search as a link

When you click Finish, a link to your search is created that you can use the next time you want to make the same search.You can save, copy or send it as an e-mail.

Example of URL to a saved query

The next time you run your search, the retrieval will be shown according to the alternative you chose.

New June 2019

Show made choises in a saved query

To get back and see what choises are made for the saved query you add ?select. You come to the page where you choose variables in PxWeb and can see what variables and values are done for the query.

Exemple

Saved query: http://www.statistikdatabasen.scb.se/sq/70067 

See the choises made: http://www.statistikdatabasen.scb.se/sq/70067?select

You come to the page with choises and can made changes as you wish. 

Change formate of your saved query

If you like a saved query for exact same table but in a different output format you can change format by adding a file extension.

Exemple

URL to saved query ”Same as shown on screen" http://www.statistikdatabasen.scb.se/sq/70073

URL to same table but the format is Excel: http://www.statistikdatabasen.scb.se/sq/70073.xlsx

If you choose the new format HTML5 table you get an html-code for the table that can be used in your own website.  

http://www.statistikdatabasen.scb.se/sq/70073.html5_table

The following output formats are supported by this functionality:

File extension Output format
.px PX-file
.xlsx  Excel-file
.xlsx_doublecolumn Excel-file with double column
.csv Csv-file
.csv_tab  Tab separated csv-file without heading
.csv_tabhead  Tab separated csv-file with heading
.csv_comma  Comma separated csv-file without heading
.csv_commahead  Comma separated csv-file with heading
.csv_space  Space separated csv-file without heading
.csv_spacehead  Space separated csv-file with heading
.csv_semicolon  Semicolon separated csv-file without heading
.csv_semicololhead  Semicolon separated csv-file with heading
.json_stat  json-stat-file
.html5_table HTML5 table
.relational_table Relational table (txt)

Change language of the saved query (release  2020-09-21)

If the table in translated to more languages you can add ?lang=X to the URL of the saved query. 

Exampel 

http://www.statistikdatabasen.scb.se/sq/67752?lang=en

The table is shown in English

Contact

Statistics Service

Telephone
+46 10 479 50 00
Opening hours
Weekdays
9:00–12:00, 13:00–16:00