Introduction

The first step when creating a Power BI report is to connect with data sources. Power BI can connect to a wide range of data sources. This capability allows users to access and analyze data from various sources within Power BI. One important format to often deal with is JSON. With the import mode, the data is loaded into Power BI. In this tutorial, we want to import data from a JSON file into Power BI. This can be easily done in the Power BI Desktop interface.

Data Source

Our data source is the JSON file "student". The file contains the following data:

{
    "students": [
        {
            "studentid": "1",
            "name": "Mike",
            "birthdate": "2003-05-20",
            "birthyear": "2003",
            "gender": "male",
            "creditpoints": "50"
        },
        {
            "studentid": "2",
            "name": "Eliza",
            "birthdate": "2002-01-01",
            "birthyear": "2002",
            "gender": "male",
            "creditpoints": "40"
        },
        {
            "studentid": "3",
            "name": "Lara",
            "birthdate": "2002-08-05",
            "birthyear": "2002",
            "gender": "female",
            "creditpoints": "80"
        },
        {
            "studentid": "4",
            "name": "Jackie",
            "birthdate": "2003-05-23",
            "birthyear": "2003",
            "gender": "female",
            "creditpoints": "90"
        },
        {
            "studentid": "5",
            "name": "Travis",
            "birthdate": "2001-12-19",
            "birthyear": "2001",
            "gender": "male",
            "creditpoints": "75"
        },
        {
            "studentid": "6",
            "name": "Caleb",
            "birthdate": "2000-03-02",
            "birthyear": "2000",
            "gender": "male",
            "creditpoints": "60"
        },
        {
            "studentid": "7",
            "name": "Ava",
            "birthdate": "2000-07-26",
            "birthyear": "2000",
            "gender": "female",
            "creditpoints": "100"
        },
        {
            "studentid": "8",
            "name": "Nathan",
            "birthdate": "2002-11-20",
            "birthyear": "2002",
            "gender": "male",
            "creditpoints": "45"
        },
        {
            "studentid": "9",
            "name": "Cooper",
            "birthdate": "2001-06-08",
            "birthyear": "2001",
            "gender": "male",
            "creditpoints": "95"
        },
        {
            "studentid": "10",
            "name": "Murphy",
            "birthdate": "2003-12-01",
            "birthyear": "2003",
            "gender": "female",
            "creditpoints": "70"
        }
    ]
}

Power BI Desktop

In the following, we explain step by step how to import the data into Power BI Desktop.

Open Power BI Desktop

First, we open Power BI Desktop:

Get Data

Now, we click on the button “Get data”:

Choose Data Source

You can view this post with the tier: Academy Membership

Join academy now to read the post and get access to the full library of premium posts for academy members only.

Join Academy Already have an account? Sign In