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.
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.
Solved! Go to Solution.
@Anonymous - What about using the Size field? You could set N = 1 and Y = 2 for example in a measure
@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
@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
@Greg_Deckler,@amitchandak thanks for the reply guys. For example, below is a very simple data set:
TIMESTAMP | NetworkDrive | Saving speed (in sec) | OfficeVersion |
2020-09-03 | N | 2 | 1902 |
2020-09-05 | Y | 5 | 1908 |
2020-09-07 | N | 1 | 1908 |
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |