Table with Embedded Chart in Power BI using R

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

barbox

Visualization is any kind of graphical representation that enable us to:

Exploration, it help us to get more deep insight through huge amount of data

Discovery, It also gives extra vision

Analysis, it can be used to find pattern

Communication, visualization help us to communicate better

A few years ago Dr. Andrew Abela published a good diagram helping to decide about which chart are a better fit for a given data and problem at hand.

1

This chart manily focused on the main four purposes that we do visualization.

1-Comparison- is about comparision regarding the items or regarding the time.

2-Distribution-is about the finding distribution of single varibale, two-variable, and three variables.

3-Relationship-is about the finding relationship among items

4-Composition-finding data composition over time or static

Most of these charts are avilabe in Power BI, however some of them are not,

Comparison, can be comparing items overtime, or among items.

For comparision over time, sometimes we prefer to compare  items for many periods. Power BI there is a chart name “Radar Chart”. Below picture shows the radar chart, we can see the Radar chart that shows the sales amounth by month name. and this sales amounth will repeated.

radarchart

for comparing the non-cyclical data for many periods. we able to use “Line Chart”.

non-cylica

for comparison over time, and for few periods we able use “Clustered Column Chart” or “Line Chart”.

another type of comparison is comparison among items. for Two-Variable per items we can use columnwith chart that I have explained in  Column Width Chart post.

 

columnwidthchart

For comparision,  one-variable per items, we can use many categories or few categories. for few categories if there is lots of items we can use “Stacked Bar Chart”. or if there is few items we can use “Stacked Column Chart”.

However for comparing one variable per items and for different categories we need a chart that is not exist in Power BI yet the name is “Table with Embeded Chart “.

I am going to create a custom visual for this chart.

I followed the steps from Post,  to create a custom visual, so in the “script.r” I have wrote the below codes

as you see in above code I need to have two different  libraries : “ggplot2″ and “reshape2″.

however, there is a possibility to drwa it in R visual section in Power BI

by writting the below codes

in this chart I am going to use the “Adventure works dataset” for showing the sales amonth for different products color and also for different year.

 

tabel

In the above chart. I have shown the product sales for different years and for different product colors.

I can change the type of the chart type to different one like “Box Plot” to show the data distributions.

then I have below picture

bocpot

 

in above picture, as you can see, we have sales amounth distribution for different year (color) and different product colors.

 

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail
rssyoutuberssyoutube
Leila Etaati
Dr. Leila Etaati is Principal Data Scientist, BI Consultant, and Speaker. She has over 10 years’ experience working with databases and software systems. She was involved in many large-scale projects for big sized companies. Leila has PhD of Information System department, University of Auckland, MS and BS in computer science. Leila is Microsoft Data Platform MVP.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">