Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi Community, I have a scatter plot with a measure to highlight a selected data point using this approach:
It solved like 80% of my data points, but I have a concentrated data in a few areas where it does not work. Tried using category method and a few others, but there is too much overlap in parts of the data. With regards to the measure below, any way to move the selected value to the front so I can see the Red, or change the size / shape to make the selected value more distinguishable? Thank you!
Red Selected Color = IF ( SELECTEDVALUE ( Slicer[Column] ) = SELECTEDVALUE ( Table[Column] ), "Red" )
Solved! Go to Solution.
Hi @ccjj ,
I uploaded another pbix using your sample data. The bubble size will change only if customer "AA" is selected.
https://drive.google.com/file/d/1SYTQ8aVfnWJa3CnM_xI8ND7eUnargsmo/view?usp=sharing
Proud to be a Super User!
Hi @ccjj ,
Here's the updated pbix: https://drive.google.com/file/d/1SYTQ8aVfnWJa3CnM_xI8ND7eUnargsmo/view?usp=sharing
Please note that there are multiple approaches to removing duplicates and one may be better than the other depending on your use case:
Proud to be a Super User!
Hi @ccjj ,
Ther is an option to change the size of the bubbles in the scattergraph.
You can use the measure below to dynamically change the bubble size when the selectedvalue is Red
Measure2 =
IF (
SELECTEDVALUE ( Table[Column] ) = "Red",
[Orignal Measure] * 3,
//you can use a different number here
[Original Measure]
)
If this solution doesn't work for you, please post a sample pbix so it will be easier for me or other users to provide you with a working solution or one that is closer to your requirements.
Proud to be a Super User!
Here is my sample pbix
https://www.dropbox.com/s/z6zz5c7lab3j8wj/SampleScatter.pbix?dl=0
in the file, customers "A", "AA", and "AAA" are all overlapping and for some reason, I am unable to dynamically change the bubble size of the RED Selected customer. thank you!
Thank you! tried that and it changed my scatter graph to (1) no Fill (2) did not change the size of the datapoint. Let me see if I can create some sample data and recreate this in PBI
Hi @ccjj ,
After testing myself the formula I initially recommended for the size, it turned out it wouldn't work as plot sizes are just too big. So I changed it to somethign like IF(SELECTEDVALUE(tbl[column] = "Red", .0000001, 0 ). The bubble size is more doable but could still be too big. I am attaching a pbix which is originally from sqljason - I edited it to somehow work for your requirements.
https://drive.google.com/file/d/18WpSdQsNHJ5SX4C6I-5HQK4xWYcM8viW/view?usp=sharing
Proud to be a Super User!
Hi Danextian, thank you for searching for a solution. Unfortunately when I tried this, it just makes the bubble size bigger (for all data points), not just the RED, so left with the same problem :(.
Have you checked on the attached pbix?
Proud to be a Super User!
Hi Danextian, I tried to replicate the measure to apply to "Size" and it just increases all bubbles and I still am not able to see the "Red" bubble.
Measure2 =
IF (
SELECTEDVALUE ( Table[Column] ) = "Red",.00000000000001 ,0)
Hi @ccjj ,
I uploaded another pbix using your sample data. The bubble size will change only if customer "AA" is selected.
https://drive.google.com/file/d/1SYTQ8aVfnWJa3CnM_xI8ND7eUnargsmo/view?usp=sharing
Proud to be a Super User!
Hi Danextian,
its almost there! 🙂
Any way to make this Bubble size dynamic based on selected value? this would only work if I know the duplicate data points. When dealing with thousands of data points, this becomes problematic.
Also, any way to control the size of the highlighted bubble size (dark blue)
Hi @ccjj ,
What do you mean by duplicate data points?
As to the size, they can be calculated dynamically but the bubbles are way too big. Alternatively you can use 0 and blank() instead but the blank will remove the fill and you'll end up with just the border - the bubble size is smaller though.
Proud to be a Super User!
hi @danextian
I have a few additional questions.
(1) If I have duplicate data values, is there a way to update the Measure "Sel_Customer" to only get Distinct sums? I modifed the data to simulate the issue on the pbix.
(2) I have experimented and failed to create a second scatter (tied to the first one) where if I select a "Customer" a second scatter populates the data with ONLY the relevant "Segment" data + the Customer in RED. For example, when I filter "Customer AA" the second scatter chart populates with Customers with associated "Segment1" in Column "Segment"....so in the result, I should ONLY see Customers A, AA, AA, with "Customer AA" in RED
Would love your help...I am stumped! 😞
https://www.dropbox.com/s/thothqey846smya/SampleScatter%20change%20size%20when%20selected.pbix?dl=0
Hi @ccjj,
What do you mean by distinct sums? If you are referring to Sample data table, you can remove the duplicates using Power Query. Alternatively, you can create a measure that summarizes Column X or Y by customer so you'll get only the distinct values and then sum it up.
Sum of Distinct X =
SUMX (
SUMMARIZE ( 'Sample Data', 'Sample Data'[Customer], 'Sample Data'[X] ),
'Sample Data'[X]
)
Sum of Distinct Y =
SUMX (
SUMMARIZE ( 'Sample Data', 'Sample Data'[Customer], 'Sample Data'[Y] ),
'Sample Data'[Y]
)
Proud to be a Super User!
Hi @danextian sorry for my lack of clarity. I added Duplicate records for "Customer AA" (to similate my dataset) and the scatter no longer highlights the red dot. Wanted to ask what adjustments I can make? thank you!
Hi @ccjj ,
Here's the updated pbix: https://drive.google.com/file/d/1SYTQ8aVfnWJa3CnM_xI8ND7eUnargsmo/view?usp=sharing
Please note that there are multiple approaches to removing duplicates and one may be better than the other depending on your use case:
Proud to be a Super User!
That Works!!! Thank you very much!
User | Count |
---|---|
92 | |
85 | |
77 | |
66 | |
62 |
User | Count |
---|---|
110 | |
95 | |
95 | |
64 | |
59 |