Power BI is a powerful business intelligence tool that enables users to create visually appealing and interactive reports. One of the key features of Power BI is its ability to connect to a wide range of data sources, including databases, Excel files, and web services. In this article, we will go through the steps of using Power Query M language code to connect to the Kognitwin data source from inside Power BI.
What is Kognitwin?
Kognitwin is a digital twin platform that enables users to create virtual replicas of physical assets, processes, and systems. It provides a comprehensive view of operations in real-time, making it easier to optimize performance, reduce downtime, and improve overall efficiency. Kognitwin is used in a variety of industries, including energy, manufacturing, and transportation.
Connecting to Kognitwin Using Power Query M Language Code
To connect to the Kognitwin data source from inside Power BI, we need to use the Power Query Editor. Power Query is a data transformation and cleansing tool that is integrated into Power BI. It allows users to extract, transform, and load data from various sources into the data model.
1. Open Power BI and select Get Data from the Home tab.
2. In the Get Data window, select the type of data source you want to connect to. In the case of Kognitwin, select Web as the data source type.
3. In the From Web window, enter the URL of the Kognitwin data source and click OK.
4. In the Navigator window, select the data you want to import into Power BI. You can preview the data by selecting the Preview button.
5. Click Load to import the data into Power BI.
6. Once the data is loaded, you can use the Power Query Editor to transform and shape the data as needed.
7. To use Power Query M language code to connect to the Kognitwin data source, select the Advanced Editor from the View tab.
8. In the Advanced Editor window, enter the following code:
Source = Json.Document(Web.Contents(“KognitwinDataURL”)),
#”Converted to Table” = Record.ToTable(Source)
#”Converted to Table”
10. Click Done to save the changes.
11. The code will retrieve the data from the Kognitwin data source and convert it into a table.
12. You can use this table to create visualizations and reports in Power BI.
Using Power Query M language code to connect to the Kognitwin data source from inside Power BI is a quick and easy way to retrieve data and create reports. By following the steps outlined in this article, you can connect to the Kognitwin data source and start creating insightful visualizations and reports in Power BI.