How to change legend to not show measurement(table) name?

SOLVED

I’m trying to make the legend more readable. I’ve researched that with combining ALIAS BY and GROUP BY you can alter the way the legend looks. I would like to get rid of the “infoLog.distinct” part. I can by putting “$CacheType $Farm $ServerName $ServerPort” in ALIAS BY. However when I do that it does’t reflect the graphs that are displayed.

The legend will display the server that are selected in the top left. For example, when I select all the ServerPort, a certain CacheType + ServerName combination might not have all the ServerPort. However it will display all the ServerPorts for each line in the graph which isn’t right. If I take out the tags in GROUP BY then it will be unreadable and meaningless graph so I’m not sure which combination of GROUP BY and ALIAS BY will make it show the correct tags for each line WITHOUT the “infoLog.distinct” part.

you have to use “$tag_FarmType $tag_CacheType $tag_ServerName $tag_ServerPort” in ALIAS BY section