Forum Discussion
Highlight single point on scatter plot using slicer instead of filtering
- 6 years ago
I think this is what you are after:
The method I followed was:
1) In power query, create a "Highlight ID" in the main table (basically concatenate [name] & [Time (secs)] & [x with jitter])2) In power query, create a Dimension Table (for your slicer) including [name] and [Highlight ID]
3) load into the model. Make sure there are no relationships between the fact table and the newly created Dim table.
4) Set up the slicer using the [Name] field from the newly created 'Dim Table Name'
5) Set up the scatter chart as you have done with the "x with jitter" and "Time (secs)" as your axes (make sure the fields are not summarized or aggregated). Both these fields are obviously from the main fact table.
6) Create you conditional formatting measure, like:
Condit Format Highlight measure = VAR check = VALUES('Dim Table Name'[Highlight ID]) VAR table_= VALUES('scatter chart highlight'[Highlight ID]) VAR calc = COUNTROWS( INTERSECT(check, table_)) Return IF(calc =1, 2)5) Use this measure as your "Rule field" in the conditional formatting inputs (set the colour for a true of "2"
And that's it.
PS. You might find some points are not visible. This is because of the density of the data (some points may be "hidden" behind others). You might have to play around with the bubble size option, the fill point or the actual colours
Here is the PBIX file for your reference:
I think this is what you are after:
The method I followed was:
1) In power query, create a "Highlight ID" in the main table (basically concatenate [name] & [Time (secs)] & [x with jitter])
2) In power query, create a Dimension Table (for your slicer) including [name] and [Highlight ID]
3) load into the model. Make sure there are no relationships between the fact table and the newly created Dim table.
4) Set up the slicer using the [Name] field from the newly created 'Dim Table Name'
5) Set up the scatter chart as you have done with the "x with jitter" and "Time (secs)" as your axes (make sure the fields are not summarized or aggregated). Both these fields are obviously from the main fact table.
6) Create you conditional formatting measure, like:
Condit Format Highlight measure =
VAR check = VALUES('Dim Table Name'[Highlight ID])
VAR table_= VALUES('scatter chart highlight'[Highlight ID])
VAR calc = COUNTROWS(
INTERSECT(check, table_))
Return
IF(calc =1, 2)
5) Use this measure as your "Rule field" in the conditional formatting inputs (set the colour for a true of "2"
And that's it.
PS. You might find some points are not visible. This is because of the density of the data (some points may be "hidden" behind others). You might have to play around with the bubble size option, the fill point or the actual colours
Here is the PBIX file for your reference:
PaulDBrown Thank you so much that is terrific and thank you also for the detailed explanation it made it very easy to understand the steps you took! Have a great day!
- PaulDBrown6 years agoCommunity Champion
Hi again. Just wanted to point out that the method works even if you use the [Name] fields in the conditional formatting measure (no need for the setting up Highlight IDs etc). The reason I went with the Highlight IDs was because I was going to use SELECTEDVALUE (until I realised that each name had more than one point in the chart.)
Anyway, Just thought it was worth mentioning.