Hi
i am using the standard setMeasureFilter script from Analytics Designer Development Handbook when I select a measure out of a Dropdown Field to select the measure for a Line Chart. Of course that is working well.
Furthermore I wanted to create individual fixed reference lines for every measure. Some are numbers, some are percentages - it depends. How do i set those individual reference lines per measure?
Request clarification before answering.
You can probably create a calculated measure using a script variable and use this calculated measure to create the (dynamic) reference line. Then you can manipulate the value of the reference line by assign the script variable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is no method setMeasureFilter, I assume you are either using DataSource#setDimensionFIilter or Chart#addMeasure, right? Would be interested in hearing back from you, which you are actually using?
I don't know your exact scenario, but maybe https://answers.sap.com/answers/13358278/view.html gives you an idea of how dynamically change measure based configurations.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bob,
thanks for your answer.
As described in the Developer Handbook on Page 163 Chapter 6.3 - but yes with DataSource#setDimensionFIilter or Chart#addMeasure.
https://saphanajourney.com/wp-content/uploads/2021/03/DeveloperHandbookSACAnalyticsDesigner.pdf
My exact scenario would be:
I have a dropdown with values(10 measures) from DataSource#getMeasures and when I select one of these Measures I do Chart#addMeasure to a Chart and ofc before I do Chart#removeMeasure the existing Measure of that Chart.
Every Measure should have a specific fixed reference line.

How do I add and remove Reference Lines with different values in the same way like Chart#addMeasure? Something like Chart#addReferenceLine(Value).
To what edgar has written - I can't quite imagine how it should go like this
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.