<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Matrix Bubble Chart in R Script Showcase</title>
    <link>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Matrix-Bubble-Chart/m-p/1683865#M352</link>
    <description>&lt;H1&gt;What&lt;/H1&gt;&lt;P&gt;A powerful Power BI R visual, matrix bubble chart, to analyze three measures (facts) with two selected dimensions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H1&gt;&amp;nbsp;&lt;/H1&gt;&lt;H1&gt;&amp;nbsp;&lt;/H1&gt;&lt;H1&gt;How&lt;/H1&gt;&lt;P&gt;One needs to have R installed on the computer or to the server / enabled in the cloud environment.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here is a guide to get started:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-r-visuals" target="_blank" rel="nofollow noopener"&gt;https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-r-visuals&lt;/A&gt;&lt;BR /&gt;Here is a link to some details:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/visuals/service-r-visuals" target="_blank" rel="nofollow noopener"&gt;https://docs.microsoft.com/en-us/power-bi/visuals/service-r-visuals&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H1&gt;Analysis example&lt;/H1&gt;&lt;UL&gt;&lt;LI&gt;The edge color of a bubble tells about the margin % of a product.&lt;/LI&gt;&lt;LI&gt;The fill color of a bubble tells about the % of opportunities won (hitrate) of a product.&lt;/LI&gt;&lt;LI&gt;The bubble size illustrates the number of the opportunities.&lt;/LI&gt;&lt;LI&gt;In the X-axis is the product dimension.&lt;/LI&gt;&lt;LI&gt;In the Y-axis is the free feature bundle given together with the product dimension.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This could be an example from the car industry. The question could be what bundles we want to offer with what products and how should we price the product &amp;amp; bundle combinations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See my blog post for an example use case:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.plainlyresults.com/blog/power-bi-r-matrix-bubble-chart-sales-opportunity-analysis/" target="_blank" rel="noopener"&gt;https://www.plainlyresults.com/blog/power-bi-r-matrix-bubble-chart-sales-opportunity-analysis/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H1&gt;CODE&lt;/H1&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Add in your Power BI R visual the code below the "Paste or type your script code here:" text.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;#change lib path to were you have ggplot2 and scales installed &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;library(ggplot2, lib="D:/Program Files/R/R-3.6.3/library") &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;require(ggplot2)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;library(scales, lib="D:/Program Files/R/R-3.6.3/library") &lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;#change columns Product, Free_feature_bundle, dataset$... to your columns in the Power BI model selected to the R visual&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ggplot(dataset, aes(x = Product, y = Free_feature_bundle, label = paste(round(dataset$Opportunity_count, digits=0), round(dataset$Hitrate_perc, digits=2)*100, round(dataset$Margin_perc, digits=2)*100, sep=";"))) +&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;geom_point(shape = 21, aes(size = round(dataset$Opportunity_count, digits=0) , fill = round(dataset$Hitrate_perc, digits=2)*100, color = round(dataset$Margin_perc, digits=2)*100, stroke = 3)) + &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;geom_text(hjust = 1, size = 4) +&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;scale_size(range = c(15,50)) + #scaling of the bubbles&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;theme_bw()+ scale_fill_gradient2("Hitrate % (fill)", low=muted("red"), high=muted("green"), midpoint = &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;mean(dataset$Hitrate_perc*100)) +theme_bw()+ scale_color_gradient2("Margin % (edges)", low=muted("red"), &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;high=muted("green"), midpoint = mean(dataset$Margin_perc*100)) + labs(size = "Number of opportunities (size)")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Feb 2021 14:35:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-02-23T14:35:36Z</dc:date>
    <item>
      <title>Matrix Bubble Chart</title>
      <link>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Matrix-Bubble-Chart/m-p/1683865#M352</link>
      <description>&lt;H1&gt;What&lt;/H1&gt;&lt;P&gt;A powerful Power BI R visual, matrix bubble chart, to analyze three measures (facts) with two selected dimensions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H1&gt;&amp;nbsp;&lt;/H1&gt;&lt;H1&gt;&amp;nbsp;&lt;/H1&gt;&lt;H1&gt;How&lt;/H1&gt;&lt;P&gt;One needs to have R installed on the computer or to the server / enabled in the cloud environment.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here is a guide to get started:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-r-visuals" target="_blank" rel="nofollow noopener"&gt;https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-r-visuals&lt;/A&gt;&lt;BR /&gt;Here is a link to some details:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/visuals/service-r-visuals" target="_blank" rel="nofollow noopener"&gt;https://docs.microsoft.com/en-us/power-bi/visuals/service-r-visuals&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H1&gt;Analysis example&lt;/H1&gt;&lt;UL&gt;&lt;LI&gt;The edge color of a bubble tells about the margin % of a product.&lt;/LI&gt;&lt;LI&gt;The fill color of a bubble tells about the % of opportunities won (hitrate) of a product.&lt;/LI&gt;&lt;LI&gt;The bubble size illustrates the number of the opportunities.&lt;/LI&gt;&lt;LI&gt;In the X-axis is the product dimension.&lt;/LI&gt;&lt;LI&gt;In the Y-axis is the free feature bundle given together with the product dimension.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This could be an example from the car industry. The question could be what bundles we want to offer with what products and how should we price the product &amp;amp; bundle combinations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See my blog post for an example use case:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.plainlyresults.com/blog/power-bi-r-matrix-bubble-chart-sales-opportunity-analysis/" target="_blank" rel="noopener"&gt;https://www.plainlyresults.com/blog/power-bi-r-matrix-bubble-chart-sales-opportunity-analysis/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H1&gt;CODE&lt;/H1&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Add in your Power BI R visual the code below the "Paste or type your script code here:" text.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;#change lib path to were you have ggplot2 and scales installed &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;library(ggplot2, lib="D:/Program Files/R/R-3.6.3/library") &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;require(ggplot2)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;library(scales, lib="D:/Program Files/R/R-3.6.3/library") &lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;#change columns Product, Free_feature_bundle, dataset$... to your columns in the Power BI model selected to the R visual&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ggplot(dataset, aes(x = Product, y = Free_feature_bundle, label = paste(round(dataset$Opportunity_count, digits=0), round(dataset$Hitrate_perc, digits=2)*100, round(dataset$Margin_perc, digits=2)*100, sep=";"))) +&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;geom_point(shape = 21, aes(size = round(dataset$Opportunity_count, digits=0) , fill = round(dataset$Hitrate_perc, digits=2)*100, color = round(dataset$Margin_perc, digits=2)*100, stroke = 3)) + &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;geom_text(hjust = 1, size = 4) +&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;scale_size(range = c(15,50)) + #scaling of the bubbles&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;theme_bw()+ scale_fill_gradient2("Hitrate % (fill)", low=muted("red"), high=muted("green"), midpoint = &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;mean(dataset$Hitrate_perc*100)) +theme_bw()+ scale_color_gradient2("Margin % (edges)", low=muted("red"), &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;high=muted("green"), midpoint = mean(dataset$Margin_perc*100)) + labs(size = "Number of opportunities (size)")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 14:35:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Matrix-Bubble-Chart/m-p/1683865#M352</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-23T14:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix Bubble Chart</title>
      <link>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Matrix-Bubble-Chart/m-p/2443913#M364</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to create a chart but I am stuck while running the script, the error is "&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;can you please help me to proceed?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Neha&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 15:21:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Matrix-Bubble-Chart/m-p/2443913#M364</guid>
      <dc:creator>nehajadhav166</dc:creator>
      <dc:date>2022-04-07T15:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix Bubble Chart</title>
      <link>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Matrix-Bubble-Chart/m-p/2639917#M366</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="367961" data-lia-user-login="nehajadhav166" class="lia-mention lia-mention-user"&gt;nehajadhav166&lt;/a&gt;&amp;nbsp;Assuming that ggplot2 and scales packages are installed, try modifying the R script and remove or comment out the lib= instructions, like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# if R is already in your path, you do not need the lib= instruction
library(ggplot2) #, lib="D:/Program Files/R/R-3.6.3/library")
require(ggplot2)
library(scales) #, lib="D:/Program Files/R/R-3.6.3/library")&lt;/LI-CODE&gt;&lt;P&gt;That worked for me.&lt;BR /&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 01:12:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Matrix-Bubble-Chart/m-p/2639917#M366</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-15T01:12:18Z</dc:date>
    </item>
  </channel>
</rss>

