Keyword for y value

Is there a keyword to display the y value of a datapoint in the label?


I would rather do [yvalue] than [measure x] for each measure in the chart. I know [percent] is possible, but what about y value?


Thanks

Could you elaborate a little on what it is you are trying to achieve? How is the y value different from the measure value in your scenario?


The keywords [Measure Name] and [Measure Value] should meet your needs for the x and y values, but are especially useful in transposed metric sets. You can find some other keywords in the article on formatting text.

I'm trying to toggle visibility of the labels copying the 'setting series label settings'

script sample.


It is a lot easier to loop through all series and set the label text to 'y value' rather than having to work out and set each series to its measure name.

If you use a dynamic measure you can refer to the measurs (no matter which one is selected) with the same placeholder though I'm not sure it will fit your use case without knowing more about it.

Don't think it will as I am talking about multiple measures in the same chart at once

We don't have a keyword for this, but you can change line 18 of the script sample to construct the keyword based on the measure name (let me know if I misunderstood what you are trying to do).

It seemed to work for me with the following:

// Set the text to total seconds.

chartDataLabelSettings.text =

"[" + series.name + "]";


This way you are using the name of the series currently selected.

Thanks, that helped.