
How to Create Network Graph Visualizations in Microsoft PowerBI | Towards Data Science
Microsoft Powerbi is one of the most popular Business Intelligence (BI) tools, and although it has all the functions necessary for creating dynamic analytical reports for interested parties throughout the business, the creation of some extended data visualizations is more complicated.
This article will go through how to create visualizations of large network graphs in Microsoft Powerbi to ensure a dynamic and interactive study of interconnected data sets, such as supply chains, financial transactions and much more.
But before we do this, let’s look at some fast basics of network graphs.
Network column funds
Data for network graphs, called “graphic data”, are formatted data in the format of the node and the region. The nodes represent discrete things, and the ribs represent the relationship between the nodes.

Let’s take a simple example of an online social network, which can be presented in the schedule format.
Nodes relate to profiles, while the edges belong to the next status.
A simple network of 3 profiles may ultimately look like this:

With the visualization of network graphs, we can enter additional information about nodes and ribs in various ways, such as, but not limited to:
- The size of the node
- Edges size
- The color of the nodes
- The edges of the color
- Labels
Structural network data
So, now that you know the main building blocks of the network count, how do you structure and convert your data set?
Graphic data is everywhere
Although you can think: “We have only a relational data where I am,” this is often not so. In fact, many relational data sets can be visualized as a network schedule.
Let’s take a simple sales table as an example with columns for the name of the product, the name of the client and quantity.

We can represent the same sales table as a network schedule, representing both the names of the product as the type of “product” node, the name of the client as the type of “client” node, and each line as “purchased”.
Visualized as a network schedule, it may look somehow like:

Graphic data formats
There are several methods of structured data, such as, but not limited:
- Lists of components and edges (often in .csv format)
- Graphic databases (for example, neo4j)
- Graphic files (such as Graphml or Gexf)
But in this article we will use a combined list of components and edges in a single tabular set of data from the requirements for creating network graphs in Microsoft Powerbi.
Parting your data
You will need to compare your data in the next tabular format with each record representing the advantage:
- The source node (required) -> This is a unique identifier of the starting unit of the region (for example, client identifier)
- The target node (required) -> This is a unique identifier of the final node of the region (for example, product identifier)
- Source color -> This is a category identifier for the source node (for example, client type)
- Target color -> This is a category identifier for the target node (for example, product category)
- Link color -> This is a category identifier for the edge (for example, sales channel)

Creation of visualization of the network column
Now that we have data on the card, we can create a visualization of the network column.
While Microsoft does not include the visual network in the visual effects of Powerbi by default, we can access the visual market to load third -party visual effects.

For this article, we will use the visual “Astra”, which allows you to create large -scale network graphs with many settings parameters.

As soon as you install it, it will be in your visual library.

Drag the visual on your canvas, select it and pay attention to the necessary values (which we applied to the card earlier). Visual also has parameters for transmitting coordinate X and Y, as well as user labels, but we will not use these parameters in this article.

The only required values are the “source node” and “target node”, so let’s start there. Drag the columns that you applied to the card with these nodes from the data panel.

You will notice the visual graphs of our nodes and edges, but it does not look so great. We need to change some modeling settings.

To change the modeling settings, open the formatting panel, then model and increase both the distance of communication and the repulsion force. I decided to set the repulsion up to 0.3, and connect the distance up to 15.

Now you can see that we get a much better layout of our data.

Now let’s encode some additional information into the graph, changing the color of the node based on the categories of nodes. Drag the fields that you applied to the map above, to the color of the source and the color of the target.

Now you will notice that the nodes are painted in the same way, and we have a legend about visual form.

Let’s make some formatting against the background of the color and color of the nodes on the formatting panel.

Congratulations! You have created the visualization of the network column in Powerbi with dynamic staining of the node.
For example, we add even more information to the schedule:
- Turn on the weight of the node to make nodes with a large number of edges, more in size
- Adding the category of links to the color of the link
- Adding different tags to nodes
But we did not finish there.
As soon as we have visualization, interested parties should use it to make more reasonable decisions.
Interaction with the network graph
In a static network schedule, there is immediate value, for example, the ability to visually see how data is interconnected through relations.
Nevertheless, there are some additional functions that we can use to make visualization more insightful.
Firstly, we can interact with the legend by choosing categories to highlight them on the graphics. For example, the rapid location of widgets on the graphics:

We can also choose separate nodes on the graph by clicking on them.
As an alternative, you can switch “Choose neighboring nodes” in the properties of the node so that it selects not only the node, but also all the nodes directly connected to it through the edge.
For example, in the choice of “widget A” with “choice of neighboring nodes” at the show of all customers who purchased this widget:

But the choice of nodes does not just distinguish them in visualization, it transfers this filter to the rest of your Powerbi report.
This means that we can add additional diagrams to give more context to select the user.
For example, adding a bar -diagram for the quantity acquired by the client:

We can also make the opposite by filtering the data going to the network. This can be achieved in several ways, such as:
- Slisses
- The choice of pieces of other diagrams, such as a piece of diagram of donuts
- Filter panel
Let’s use Slicer to cut the graph on the type of client:

Creation of the BI Reports complex
Although the example of the network column in this article is relatively simple for demonstration purposes, you can create a rather complex BI reports for interested parties.
The visual image of the Astra Powerbi used in this article can be scaled to hundreds of thousands of ribs, and in combination with additional cross visual effects and slines can provide more advanced analytics than possible with Powerbi reports.

Conclusion
Network graphs around us are even hidden in your relational data sets. Despite the fact that there is an excellent network schedule, the creation of network graphs in Powerbi allows you to convey this expanded analytical tool for your standard interested parties BI, as well as create advanced reporting, adding the context with additional filters and diagrams.
Source link