Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Scater plot for a lot of points as categorical data

Hey

I have a categorical data set such 99 categories. When I plot the dcatrry'lot my data, I see only a few data because most of them have the same x and y. How I can handle that to see how many data exists at each point?

thanks a lot 

3 REPLIES 3
123abc
Community Champion
Community Champion

In Power BI, when you have categorical data with many categories and you want to visualize how many data points exist at each point (i.e., how many data points share the same x and y values), you can use a scatter plot with transparency or jittering to make the overlapping data points visible. Here's how you can do it:

Using Transparency:

  1. Create a Scatter Plot Visual: In Power BI Desktop, add a scatter plot visual to your report.

  2. Drag the Data Fields: In the scatter plot visual, drag the categorical data fields to the "Axis" or "Legend" area, depending on how you want to categorize the data points.

  3. Add Transparency to the Marks: To make overlapping data points more visible, you can add transparency to the data marks. To do this:

    a. Select the data points in your scatter plot visual by clicking on them (or select all points if needed).

    b. In the "Format" pane, under the "Data colors" section, find the "Transparency" slider. Increase the transparency to a level where overlapping points become distinguishable.

  4. Customize the Visual: You can further customize the visual by adjusting the colors, markers, labels, and other visual settings to make it more informative and appealing.

Using Jittering:

Another way to handle overlapping data points is by adding a bit of random jitter to their positions. This will spread out the points slightly so that you can see the density more clearly. Here's how to do it:

  1. Create a Scatter Plot Visual: Add a scatter plot visual to your report as mentioned earlier.

  2. Drag the Data Fields: Drag your categorical data fields to the appropriate areas in the visual.

  3. Enable Jittering: To enable jittering in Power BI, you can use DAX measures to add random noise to the x and y coordinates of your data points. For example:

JitteredX = YourTable[X] + RAND() / 10,

JitteredY = YourTable[Y] + RAND() / 10

 

  1. In this example, we add a small random value to the x and y coordinates using the RAND() function. Adjust the value (/ 10 in this case) to control the amount of jittering.

  2. Use Jittered Fields in the Scatter Plot: Replace the original X and Y fields in your scatter plot visual with the jittered X and Y fields you created in the previous step.

  3. Customize the Visual: Customize the visual as needed, including transparency settings if desired.

Using transparency or jittering allows you to visualize the density of data points in a scatter plot with many categories more effectively, making it easier to see how many data points exist at each point. Adjust the level of transparency or jittering to achieve the desired visual representation.

 
 
 

Hi there,

 

The RAND() function does not work when creating a new Column:

Function 'RAND' is not allowed as part of calculated column DAX expressions on DirectQuery models.

 

And creating a new measure does work but I cannot use it to create Jitter in x or y direction. How exactly can you implement this? I don't see how to create the jitter and it would really help! Thanks.

nirali_arora
Resolver II
Resolver II

The following might help you 

Transparency = VAR MaxDensity = MAX('YourTableName'[DensityMeasure]) RETURN IF(ISBLANK([DensityMeasure]), 0, [DensityMeasure] / MaxDensity)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.