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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Two Legends on Scatter chart

Hi there,

 

I'm looking for a way to add a second legend to my scatter chart. 

 

Currently I have my 

 

X-Axis: TimeStamp 

Y-Axis: Stats (Saving time) 

 

My legend right now is set to be the Microsoft  office version and I want to add a second legnd by using a boolen value (eg. If the file is saved on the local drive, Y. If the file is saved on the network server, then N). 

 

I don't see a way to add a second legend but it looks feasible. For example, I can use different color to represent my first legend and different shapes (dot,triangle,etc) to represent my second legend. 

 

Are there any methods to achieve that solution or anything similiar? Any help is greatly appreciated. 

 

 

1 ACCEPTED SOLUTION

@Anonymous - What about using the Size field? You could set N = 1 and Y = 2 for example in a measure


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous , I doubt you have a secondary legend. Putting in another legend will remove the previous on.

 

But if the legend is not any additional data point. Means details are al line level and legend only doing color. Then you can try a measure to conditional formatting. Using "Field Value" option

 Like

color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)

 

But this will only work when legend so adds rows data. And you can not use a legend if you want conditional formating

Greg_Deckler
Super User
Super User

@Anonymous No secondary Y axis in Scatter chart. Not sure how that would work. What is the issue you are having? Do you have some sort of scale issue going on? Maybe a third party visual and then there is always R and Python. And SVG.

https://community.powerbi.com/t5/R-Script-Showcase/bd-p/RVisuals


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler,@amitchandak  thanks for the reply guys. For example, below is a very simple data set: 

TIMESTAMP NetworkDriveSaving speed (in sec)OfficeVersion
2020-09-03N21902
2020-09-05Y51908
2020-09-07N11908


TimeSTAMP is unique for each entry. 

I have my Y axis as saving speed, X axis as timestamp. 

The legend is OfficeVersion, but I also like to show networkDrive on the chart. So the ideal graph would be like:

Red dot for row1, Yellow triangle for row 2, Yellow dot for row 3. 

 

If that makes sense. 

@Anonymous , A bit different if it can work Saving speed (in a sec) , OfficeVersion as two axis , Date as details, and network as a legend.

 

If not, Try the @Greg_Deckler  suggestion.

 

@Anonymous - What about using the Size field? You could set N = 1 and Y = 2 for example in a measure


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.