skip to main content
Power BI
    • What is Power BI
    • Why Power BI
    • Customer stories
    • Data visuals
    • Security
    • Power BI Desktop
    • Power BI Pro
    • Power BI Premium
    • Power BI Mobile
    • Power BI Embedded
    • Power BI Report Server
  • Pricing
    • Azure + Power BI
    • Microsoft 365 + Power BI
    • Dynamics 365 + Power BI
      • Energy
      • Healthcare
      • Manufacturing
      • Media
      • Retail
    • For analysts
    • For IT
      • Overview
      • Embedded analytics
      • Power BI visuals
      • Automation
      • Documentation
      • Community
    • Partners Overview
    • Solutions Partners
    • BI Specialized Partners
    • Power BI CSOs
    • Fabric Partner Community
    • Training
    • Getting started
      • Overview
      • Self-guided learning
      • Webinars
      • Documentation
      • Roadmap
      • Overview
      • Issues
      • Give feedback
    • Blog
    • Business intelligence topics
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • Events
    • User groups
    • Community blog
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Power BI forums
    • Updates
    • News & Announcements
    • Get Help with Power BI
    • Desktop
    • Service
    • Report Server
    • Power Query
    • Mobile Apps
    • Developer
    • DAX Commands and Tips
    • Custom Visuals Development Discussion
    • Health and Life Sciences
    • Power BI Spanish forums
    • Translated Spanish Desktop
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Training and Consulting
    • Instructor Led Training
    • Galleries
    • Community Connections & How-To Videos
    • COVID-19 Data Stories Gallery
    • Themes Gallery
    • Data Stories Gallery
    • R Script Showcase
    • Webinars and Video Gallery
    • Quick Measures Gallery
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Events
    • Ideas
    • Custom Visuals Ideas
    • Issues
    • Issues
    • Events
    • Upcoming Events
    • Community Engagement
    • T-Shirt Design Challenge 2023
    • Community Blog
    • Power BI Community Blog
    • Custom Visuals Community Blog
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 

    Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

    • Power BI forums
    • Galleries
    • R Script Showcase
    • Re: Clustering

    Re: Clustering

    04-09-2018 05:55 AM

    Cking
    New Member
    35914 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    Sharon
    Microsoft Sharon
    Microsoft
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    Clustering

    ‎08-14-2016 09:28 AM

    report_clustering.JPGDescription

    Clustering is used to find similarity groups in your data. For example, the clustering algorithm and visual can automatically find customer segments, for which you can then optimize in your marketing campaigns.

     

    Prerequisites (The sample .pbix files will not work without these prerequites completed)

    1. Install R Engine

    Power BI Desktop does not include, deploy or install the R engine. To run R scripts in Power BI Desktop, you must separately installR on your local computer. You can download and install R for free from many locations, including the Revolution Open download page, and the CRAN Repository.

     

    2. Install the required R packages.

    Download the R script attached to this message and run it to install all required packages on your local machine. 

     

    Required R packages:

    cluster. car. scales, fpc, mclust, apcluster, vegan

     

    Tested on:

    CRAN 3.3.1, MRO 3.3.0, powerbi.com

     

    Legal Disclaimers:

    Terms of Service and Third Party Programs.

     

    Preview file
    7 KB
    Clustering Kmeans Showcase .pbix
    ScriptInstallPackagesWithWorkaroundsClustering.R
    Labels:
    • Labels:
    • Advanced Analytics Visualizations
    Message 1 of 8
    46,537 Views
    14
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic
    Cking
    Cking
    New Member
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎04-06-2018 12:38 PM

    I recieved an error when trying to download the 'vegan: Community Ecology Package' on my desktop. Anyone else having this problem? I have reported the error.

    Message 6 of 8
    35,949 Views
    0
    Reply
    boefraty
    Microsoft boefraty
    Microsoft
    In response to Cking
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎04-08-2018 01:58 AM

    Hi @Cking, 

    Try to install it from RStudio console with 


    >install.packages("vegan")

     

    Still failure? 

    You mau comment out 
    #libraryRequireInstall("vegan")

     

    Just don't use "long" method for number of clusters search 

    Message 7 of 8
    35,929 Views
    0
    Reply
    Cking
    Cking
    New Member
    In response to boefraty
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎04-09-2018 05:55 AM

    Hi @boefraty,

     

    Thanks for the reply. I used RSstudio console and downloaded all packages without further trouble.

     

    Chris

    Message 8 of 8
    35,914 Views
    0
    Reply
    NallelyOL
    NallelyOL
    New Member
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎12-15-2016 04:09 PM

    Good day. I installed all the prerequisites in my machine but it does not enable the option. Will I be missing something else?

    Message 5 of 8
    42,988 Views
    0
    Reply
    jeffpbi
    Microsoft jeffpbi
    Microsoft
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-07-2016 11:24 AM

    As a Power BI author with only the most basic knowledge of R, I think the R Library is a great concept.  However, actually making use of what's been posted on the site is extremely hard because so much code has been written into the examples, I have no idea which lines of code are actually driving the visual.  When I pasted the code into a Word document, it was 18 pages in length, with 1851 words. 

     

    Is there any way to simplify what's in the library so that it's more comprehensible and usable?

     

    Thanks,

    Jeff

     

     

    Message 2 of 8
    44,558 Views
    0
    Reply
    boefraty
    Microsoft boefraty
    Microsoft
    In response to jeffpbi
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎11-22-2016 01:35 AM

    Hi,

    The clustering code is too complicated, mostly because it contains the implementation of the the automatic mode and many parameters to create flexible visual. In addition we do a lot of data correctness testing... 

     

    The simplest code to start with is "corrplot".  We recommend to look at the R code in dedicated R-IDE, like RStudio.

    Message 4 of 8
    43,511 Views
    0
    Reply
    chrislbs
    chrislbs
    Frequent Visitor
    In response to jeffpbi
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎11-03-2016 11:27 AM

    R is its own language and it takes most of us some time to learn how to do the basics in it, not to mention the more advance transformations and graphics.  This code is very well commented with #Comments Here and that should give you a sense as to what each step is doing.

     

    You might want to load the script into R and then watch the graphics pane as you parse the code line by line.  The function plot(...)  is where some of the work is done, and then the subsequent statements add to it according to the parameters defined at the beginning of the script. 

     

     

    Message 3 of 8
    43,884 Views
    0
    Reply

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Pages
    • Power Automate
    • Power Virtual Agents

    • Sign in
    • Sign up

    Browse

    • Solutions
    • Partners
    • Consulting Services

    Downloads

    • Power BI Desktop
    • Power BI Mobile
    • Power BI Report Server
    • See all downloads

    Learn

    • Guided learning
    • Documentation
    • Support
    • Community
    • Give feedback
    • Webinars
    • Developers
    • Blog
    • Newsletter

    © 2023 Microsoft

    Follow Power BI

    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks
    Consumer Privacy Act (CCPA) Opt-Out Icon Your Privacy Choices