Tag Archives: custom visuals

ByHariharan Rajendran

Look Like Custom Visuals from Pre-Built Visuals in Power BI

This article explains that how to get different visuals from our pre-built visuals in Power BI. I have used these visuals on my project so I thought this would help other when you have same kind of scenarios.

Visual 1 – Customized Column Chart

My business user was using excel for their reporting and recently moved to Power BI. They were looking for a visual which is supported only in excel but they want to get in in Power BI.

Solution

As we know, we do not have any pre-built visual as like above, but we can get by combining 2 different visuals with overlap. Let me share how I achieved this visual.

Let us take a sample data for this visual. I am using financial sample data and these visuals are using Count as an aggregation type as I want to show the result with small number.

First build a clustered column chart as like below using following columns Segment, Country & Count of Records.

Next drag and drop another clustered column chart and use the following columns Segment & Count of Records. Note – Do not use Country on legend.

Format Settings

  • The size of the chart should be same as previous chart.
  • Remove background for both the charts.
  • Change the color of title, x and y axis names to white.
  • Set Y Axis scale type is Linear and Start value is 0 and End Value is 40. Based on your maximum count, set the value. Apply the same to both the charts.
  • The second visual will look like below.

Now, we need overlap on the same position and set the 2nd visual to back which means the 1st chart with country will be in front position.

Select both the visual and group them. Finally, you will see the result like below.

 

Visual 2 – Custom Donut & Pie Charts.

Same as previous approach, we are going to get below visuals.

I have used 3 charts and grouped them to make it as single chart.

Place them all with some space and group it. Like these 2 visuals, you can play with other visuals and get a new visual. Share your comment below.

Download the PBIX from here.

ByHariharan Rajendran

Power BI Custom Visuals in Office Store

As we know Microsoft Power BI is one of the best business Intelligence Tool. It is offering a variety of services to the customers. Those services are Power BI as a service – Cloud, Power BI Desktop, Power BI Mobile App, Custom Visuals and etc.
There are plenty of custom visuals are available for us to directly in our reports and dashboards. Those custom visuals are available in below URL.

https://app.powerbi.com/visuals/

The visual library is already moved to office store. Any more new visuals and updates are happening in office store. The above URL will be available until May 31, 2017.

If you have used any of the custom visuals from current visuals gallery, still it will work. To get new updates you need to check in office store.

https://store.office.com/

Visit the above URL and select Power BI under product section.
You can see the custom visuals for Power BI, visuals are available under different categories.

To download and use, follow the below steps.
1. Select the visual
2. Click “Add”
3. You can see an option “Select to download <visual name>”, click.

The visual with .pbiviz extension will be download. You can use the visual in a report as usual with import option.

ByHariharan Rajendran

Sankey Chart Visual in Power BI VS R

Check out my previous post to see the streamgraph chart comparison.

StreamGraph Visual in Power BI VS R

In this post, I have taken Sankey chart custom visual. The power bi custom visual has less functionality compare than R visuals

Power BI Desktop

We have a Sankey chart custom visual available in Power BI. Download and import into Power BI Desktop.

https://store.office.com/powerbiaddininstallpage.aspx?rs=en-US&assetid=WA104380777

Here I used a dataset called Titanic. This is one of the datasets in R which I used for this post.

R Studio 

To get the sankey visual, we need to install the alluvial package.

Run the below script in R Studio or R console application.

install.packages(‘alluvial’)
tit <- as.data.frame(Titanic)
library(alluvial)
alluvial( tit[,1:4], freq=tit$Freq, border=NA,
                                hide = tit$Freq < quantile(tit$Freq, .50),
                                 col=ifelse( tit$Survived == “No”, “red”, “yellow”) )

Power BI Desktop R Studio
Import Sankey Chart visual Install alluvial and related packages
Less Functionality More Functionality
GUI Type R Script Type
Only 2 levels of visual by default for the simple dataset. To see multi-level visuals then need to prepare a dataset with multi-level of source and destinations Multi-Levels of visual – Just add the number of fields.
ByHariharan Rajendran

StreamGraph Visual in Power BI VS R

This post just shows the comparison of streamgraph in Power BI Custom Visual and R Script Visual.

Power BI Desktop

We have a streamgraph custom visual available in Power BI. Download and import into Power BI Desktop.

https://store.office.com/en-us/app.aspx?assetid=WA104380772&sourcecorrid=373810e3-72d4-4afd-96e7-6859505efb87&searchapppos=5&ui=en-US&rs=en-US&ad=US&appredirect=false

Here I used a very simple dataset to explore the visual.

Pass the above dataset values to chart.

R Studio  

To get the streamgraph visuals, we need to install the streamgraph package and other supporting packages .

Run the below script in R Studio or R console application.
install.packages(‘devtools’)
install.packages(‘Rcpp’)
install.packages(‘zoo’)
install.packages(‘DBI’)
install.packages(‘assertthat’)
install.packages(‘tibble’)
install.packages(‘yaml’)
devtools::install_github(“hrbrmstr/streamgraph”)
library(streamgraph)
# Create data:
year=rep(seq(2000,2005) , each=1)
name=c(letters[1:6])
value=c(1000,200,600,500,1250, 300)
data=data.frame(year, name, value)
streamgraph(data, key=”name”, value=”value”, date=”year”)

Power BI Desktop R Studio
Import Streamgraph visual Install Streamgraph and related packages
Visual values are keep

amending on the initial value

Identifies the maximum value and accommodate all the values within the maximum range
It is not interactive It is interactive
GUI Type R Script Type
Can’t export as HTML Can export as HTML
1