How to Create a Push Dataset in Power BI

Cody Schneider9 min read

Getting your most up-to-date data into Power BI can sometimes feel like a chore, especially when it’s coming from a custom application, a script, or an IoT device. If you're tired of manual CSV uploads or trying to find a pre-built connector that doesn’t exist, then Power BI Push Datasets are exactly what you need. This article will show you how to use Power BI's REST API to create and send data directly to a dataset, putting real-time reporting right at your fingertips.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

What Exactly Are Power BI Push Datasets?

In most Power BI scenarios, Power BI pulls data from a source on a schedule. Think of it connecting to SQL Server, an Excel file in OneDrive, or your Salesforce account and fetching fresh data every hour. A push dataset flips this process on its head: instead of Power BI pulling data, your application pushes data directly into Power BI whenever a new event occurs.

Each time you send new data via the API, it gets added to the dataset that's stored within the Power BI service. This makes it perfect for near real-time dashboards where you want visuals to update as new events happen.

Push vs. Streaming Datasets: What’s the Difference?

This is a common point of confusion. Both seem to involve “live” data, but they function very differently:

  • Push Datasets: You push data to Power BI, and Power BI stores this data in a historical database within the service. This is a huge benefit because you can create standard Power BI reports on this data, use filters, slicers, and perform historical analysis, just like with a dataset imported from a database.
  • Streaming Datasets: You send data to Power BI, but it’s only stored in a temporary cache to populate real-time visuals. The underlying data isn't saved long-term, which means you cannot build traditional reports, pin report visuals to dashboards, or analyze historical trends. It’s designed for firehose-style data where you just want to see what’s happening at this exact moment.

For most use cases, like tracking application signups, monitoring sales, or logging system events, a push dataset is the more flexible and powerful choice because it gives you both real-time updates and historical analysis capabilities.

When Should You Use a Push Dataset?

Push datasets are ideal whenever you need to:

  • Visualize data from custom applications or internal services that don't have a native Power BI connector.
  • Get more frequent updates than Power BI's scheduled refresh limits allow.
  • Display data from low-power devices (like IoT sensors) that can't be queried directly.
  • Aggregate data from multiple sources in a script (like a Python script) and send the final results to a single dashboard.
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Prerequisites: What You’ll Need Before You Start

Before getting your hands dirty, make sure you have the following ready. Setting this up is the most technical part, but once it’s done, you’re good to go.

  1. A Power BI Pro or Premium Account: Using the REST API is a Pro/Premium feature. A work or school account is required.
  2. An Azure Account: You’ll need this to register an application in Azure Active Directory (Azure AD), which is Microsoft’s cloud-based identity service that Power BI uses for authentication.
  3. An API Tool: You need an application to send API requests. For this tutorial, we will be using Postman, which is a popular and free tool perfect for this job. You could also use scripting languages like Python or PowerShell.

Step-by-Step Guide: Creating Your First Push Dataset

We'll walk through the entire process, from setting up authentication in Azure to pushing data and finally seeing it in a Power BI report.

Step 1: Register an Application in Azure Active Directory (Azure AD)

To use the Power BI API, your script or application first needs to properly identify itself to Microsoft. Think of this as getting a special ID card that grants it permission to interact with your Power BI account.

  1. Go to the Azure Portal and sign in.
  2. Search for and select Azure Active Directory.
  3. On the left pane, go to App registrations and click + New registration.
  4. Give your application a name, like "My Power BI Pusher". For "Supported account types," you can usually select "Accounts in this organizational directory only." Leave the Redirect URI blank for now. Click Register.
  5. Once created, you'll be taken to the app's overview page. Grab your Application (client) ID and Directory (tenant) ID. Copy these somewhere safe, you'll need them soon.
  6. Next, you need to create a "password" for your application, called a client secret. In the left pane, go to Certificates & secrets, click the Client secrets tab, and then + New client secret.
  7. Give it a description and an expiration date. Click Add. Immediately copy the Value of the secret. This is the only time it will be fully visible, so save it now!
  8. Finally, you need to give your application permission to interact with Power BI. Go to API permissions in the left pane. Click + Add a permission, then select Power BI Service.
  9. Choose Delegated permissions, and check the box for Dataset.ReadWrite.All. Click Add permissions to save.

Great! Your app is now registered and has a client ID and client secret.

Step 2: Get an API Access Token Using Postman

Your client ID and secret don't give you direct access. Instead, you trade them for a temporary access token, like trading your ticket for a wristband at a concert. This token is what you will use to authenticate your API calls.

In Postman, set up a new POST request with the following details:

  • Method: POST
  • URL: https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/token Replace YOUR_TENANT_ID with the Directory (tenant) ID you copied earlier.

In the Body tab section of your request, select x-www-form-urlencoded and add the following key-value pairs:

  • client_id: Your Application (client) ID.
  • client_secret: Your Client Secret value.
  • grant_type: password.
  • scope: https://analysis.windows.net/powerbi/api/.default.
  • username: Your Power BI login email address.
  • password: Your Power BI login password.

Click Send. If everything is correct, you'll get back a JSON response containing an access_token. This token is gold - it’s your key to the Power BI API for the next hour. Copy the entire token (it will be very long!).

Note: If your organization has Multi-Factor Authentication (MFA), the password grant-type approach won't work. In that case, you have to use an approach with a service principal.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 3: Create the Dataset in Power BI (with your desired table structure/schema)

Now for the fun part. Before you can send data, you have to create a home for it. You do this by defining a schema (the tables, columns, and data types) and sending that schema to Power BI.

Open a new request in Postman:

  • Method: POST
  • URL: https://api.powerbi.com/v1.0/myorg/datasets

Go to the Headers tab and add one header:

  • Key: Authorization
  • Value: Bearer YOUR_ACCESS_TOKEN Replace YOUR_ACCESS_TOKEN with the token you copied earlier.

Next, go to the Body tab, select raw and JSON from the dropdown. This is where you’ll define your table structure. Let's create a simple dataset to track website leads:

{
  "name": "Live Website Leads",
  "tables": [
    {
      "name": "Leads",
      "columns": [
        {
          "name": "Timestamp",
          "dataType": "Datetime"
        },
        {
          "name": "Source",
          "dataType": "String"
        },
        {
          "name": "Email",
          "dataType": "String"
        },
        {
          "name": "Status",
          "dataType": "String"
        }
      ]
    }
  ]
}

Click Send. A successful request will return a 201 Created status with JSON data containing the id of your newly created dataset. Copy this Dataset ID!

Step 4: Push Data to Your New Dataset

With an empty dataset now waiting for you in Power BI, it's time to add some data. For this task, you’ll construct a new POST request in Postman targeting your dataset's specific table:

  • Method: POST
  • URL: https://api.powerbi.com/v1.0/myorg/datasets/DATASET_ID/tables/Leads/rows Replace DATASET_ID with the ID you copied in the previous step and Leads with the name you provided for your table in your dataset.

In the Headers tab, set up the Authorization header exactly as you did before (using Bearer and your access token).

In the Body tab (raw, JSON), you will now create the data you want to send in a JSON object. Make sure the object contains a key called “rows” which is an array containing your data.

{
  "rows": [
    {
      "Timestamp": "2023-11-20T10:30:00Z",
      "Source": "Organic Search",
      "Email": "jane.doe@example.com",
      "Status": "New"
    },
    {
      "Timestamp": "2023-11-20T10:32:15Z",
      "Source": "Facebook Ads",
      "Email": "john.smith@example.com",
      "Status": "New"
    }
  ]
}

Click Send. A 200 OK response means the data was successfully added!

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 5: Visualize Your Data in Power BI

Now for the payoff. Head over to the Power BI Service (app.powerbi.com) and go to the workspace where you want to work.

  1. In your list of assets, you'll see your new "Live Website Leads" dataset. Its icon will distinguish it as different from a standard dataset.
  2. Click the ellipsis (...) next to the dataset name and select Create report.
  3. You'll now be in the familiar Power BI report editor. On the right-hand Fields pane, you’ll see your "Leads" table and its columns: Timestamp, Source, Email, and Status.

You can now drag and drop these fields to build visuals just like with any other data source. Create a bar chart showing leads by Source, a count of leads, and a table with the latest leads. As you use your API tool to push more JSON objects with rows of data, you can simply click the Refresh button on your Power BI report and your visuals will immediately update to reflect the newly added information!

Final Thoughts

Creating Power BI push datasets is a powerful technique for unlocking near real-time analytics. While it requires a bit of one-time setup with Azure AD and learning to use the REST API, it opens the door to visualizing data from any custom source, letting you go far beyond the built-in connectors to get the live pulse of your operations.

Setting up and maintaining custom API connections, pipelines, and warehouses can become complex, especially when you have data scattered across multiple platforms like Google Analytics, Shopify, Facebook Ads, and your CRM. We built Graphed to remove this friction. Instead of wrestling with tokens and endpoints, you connect your sources in a few clicks, and we handle the data consolidation for you. Then, you can simply ask in plain English — "show me leads from Facebook Ads vs. Organic Search this month" — and instantly get the dashboard you need, all with live data.

Related Articles