Product Insights

Are you looking for a way to connect to the Product Insights data source from inside Power BI? If so, you’ve come to the right place. In this article, we’ll explore the Power Query M language code that you can use to connect to the Product Insights data source, and we’ll provide step-by-step instructions to help you get started.

What is Power Query M Language?

Product Insights

Power Query M Language is a formula language used to mash up data from various sources. It is used in Power Query, a data transformation and data preparation tool used in Microsoft Power BI. Power Query allows you to connect to various types of data sources, transform the data, and load it into Power BI for analysis and visualization.

What is Product Insights?

Product Insights is a data analytics tool that provides insights into your product usage data. It allows you to track user behavior, identify trends, and optimize your product for better performance and customer satisfaction. Product Insights can be used with various types of products, including software applications, websites, and mobile apps.

Connecting to the Product Insights Data Source from Inside Power BI

To connect to the Product Insights data source from inside Power BI, you’ll need to use the Power Query M language code. Here’s how you can do it:

1. Open Power BI and click on the “Get Data” button.

2. In the “Get Data” window, select “Web” from the list of data sources.

3. In the “From Web” window, enter the following URL in the “URL” field:

“`

https://api.applicationinsights.io/beta/apps/{APP_ID}/query?query={QUERY}

“`

Replace `{APP_ID}` with your Product Insights Application ID and `{QUERY}` with your query.

4. Click on the “OK” button to continue.

5. In the “Navigator” window, you’ll see a preview of the data. You can select the tables you want to load and then click on the “Load” button to import the data into Power BI.

Using the Power Query M Language Code

Now let’s take a closer look at the Power Query M language code that we used to connect to the Product Insights data source.


let

Source = Json.Document(Web.Contents(“https://api.applicationinsights.io/beta/apps/{APP_ID}/query?query={QUERY}”)),

table = Source[tables]{0},

data = table[rows],

#”Converted to Table” = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error),

#”Expanded Column1″ = Table.ExpandRecordColumn(#”Converted to Table”, “Column1”, {“timestamp”, “name”, “value”, “cloud_RoleInstance”, “cloud_RoleName”, “operation_Name”, “operation_Id”, “operation_ParentId”, “operation_SyntheticSource”, “operation_ItemId”, “session_Id”, “client_Type”, “client_Ip”, “client_Model”, “client_OS”, “client_City”, “client_StateOrProvince”, “client_CountryOrRegion”, “client_Browser”, “client_BrowserVersion”, “client_DeviceClass”, “client_UserId”, “client_SessionId”, “client_AuthenticatedUserAccountId”, “client_AuthenticatedUserName”}, {“timestamp”, “name”, “value”, “cloud_RoleInstance”, “cloud_RoleName”, “operation_Name”, “operation_Id”, “operation_ParentId”, “operation_SyntheticSource”, “operation_ItemId”, “session_Id”, “client_Type”, “client_Ip”, “client_Model”, “client_OS”, “client_City”, “client_StateOrProvince”, “client_CountryOrRegion”, “client_Browser”, “client_BrowserVersion”, “client_DeviceClass”, “client_UserId”, “client_SessionId”, “client_AuthenticatedUserAccountId”, “client_AuthenticatedUserName”})

in

#”Expanded Column1″


The code above retrieves the data from the Product Insights data source and transforms it into a table format that can be loaded into Power BI. Here’s what each line of the code does:

– `let`: This keyword is used to start a new query in Power Query M language.

– `Source`: This line retrieves the data from the Product Insights data source using the URL we provided earlier. The `Json.Document` function is used to parse the JSON data.

– `table`: This line selects the first table from the data source. You can change the index number if you want to select a different table.

– `data`: This line extracts the rows from the selected table.

– `#”Converted to Table”`: This line converts the rows into a table format.

– `#”Expanded Column1″`: This line expands the columns of the table.

Conclusion

In conclusion, connecting to the Product Insights data source from inside Power BI is easy with the Power Query M language code. By following the steps we’ve outlined above, you’ll be able to import your data into Power BI for analysis and visualization. We hope you found this article helpful. If you have any questions or comments, please feel free to leave them below.

Power BI Training Courses by G Com Solutions (0800 998 9248)

Contact Us

    Subject

    Your Name (required)

    Company/Organisation

    Email (required)

    Telephone

    Training Course(s)

    Your Message

    Upload Example Document(s) (Zip multiple files)

    Similar Posts