Allow user input of chart axis in QlikView - qlikview

I'm creating a scatter chart in QlikView. I'd like the field used for the y-axis of the chart to be user selectable. For example, I create a scatter plot, and choose my x-axis as "field1" and y-axis as "field2".The actual expression in QlikView for the y-axis is SUM([field2]). This works fine to plot field1 vs. field 2.
Now, I have a list box for the user to select a field (using $Field). I can get the name of that field using GetFieldSelections($Field). That works fine as an expression for the label, but it doesn't work as an expression to replace the equivalent of SUM([field2]). How do I set my expression so that if the user chose "field2" in the listbox, I get the same result as my hard-coded "field2" expression? I tried Sum(GetFieldSelections($Field)) and that doesn't work at all. I'm guessing I need some other function which returns the field values for an input string of a field name, but I don't know what that is.
Thanks!

You could try this syntax :
Sum ($(=GetFieldSelections($Field)))
I've build a small example and it seem to work.

Related

mpandroidchart i want to change dot color by some value in scatter chart

I want to make a scatter chart
It has a not x,y value but another value that change dot color
if its value over some value
Only i have found was
MPAndroidChart, set different color to bar in a bar chart based on y axis values
this.
But in my case, there is a special value that not effect on the graph
What can i do to solve this problem?
Please help me
You need to create ArrayList of third values for each entry after that you need to add following code to change colors respectively:
dataSet.setColors(new int[]{R.color.color1 , R.color.color2} , context);

SSRS line chart

I have one question to the line chart.
I would like to create a line chart, which values are given. It should look like this chart here:
My question is, how can I implement this. I tried to put it as a stripline in the chart but it only shows a horizontal line without this steps at the beginning.
How can I create this line chart like in the picture above?
can I put into this:
the values.
Striplines are intended to display just a line across the chart, or varying width, height, to demonstrate an area... from MSDN
Strip lines, or strips, are horizontal or vertical ranges that shade the background of the chart in regular or custom intervals
To get the behaviour (I think) you require you can add a new series to the data you are returning with each of those datapoints. Irrespective of what other data you are charting, you can change the type of this series to Line Chart, and change the order of the series on teh chart to make it uppoermost.
Without further information - such as the data you are tyrying to superimpose this on - it's hard to advise further.

Is it posible to get the position of point on an excel graph axis

I'm not sure this is possible but thought this was the best place to ask.
Is it posible to get the position of a series value on a graph in excel?
For example, if I have a line graph in excel that has time along the x axis, is it possible to (using VBA) get the position of a specific point on that axis.
What I am trying to do is have a vertical line that is can be positioned based on a date entered by the user.
like this
Where the green line could be positioned by entering in a date (rather than just being manually moved) (or also it could be set to automatically move to the current date etc).
I was then thinking that if the position is on the graph is queryable, then I can just access the line object and move it to any position I wanted through VBA.
Any Ideas? or is this just not possible?
The "cleanest" way to do this is to add the line to the chart as a new series. In that way, Excel handles all of the positioning and your work is simplified. To get a vertical line on a chart, there are a number of options. I prefer this route:
Create a small 2x2 area with two dates and two values
Add in the date or x-axis value you want the line at (E3 in image). You can use =TODAY() here or some manually entered value.
Set the second x-axis value equal to the first
Use MAX and MIN on the data to get the values for each date. You can also use 0 and 1 and a secondary axis, but I think MAX/MIN is easier.
Add the data to the chart and format as a marker with straight line.
Formulas
E3: =TODAY()
E4: =E3
F3: =MIN(C3:C27)
F4: =MAX(C3:C27)
Result and chart data series for vertical line

Flexible Data Label Formatting

I'm hoping to add custom data labels to a stacked bar chart in Excel 2010. Each bar will have a label value pulled from a value in the sheet which is not necessarily equal to the height of the bar itself.
The sheet I'm making is a template and has drop-down selections to change the units of the data. For example: $MM with 1 decimal point, K with 2 decimal points, $ with 0 decimal points, etc... I'm running into an issue formatting the labels to match the data formatting selections. I've tried two approaches:
Formatting the data labels themselves using VBA. Partial code below for $K with one decimal:
`With ActiveChart.SeriesCollection(x).Points(y)`
.DataLabel.Text.NumberFormat = "$#,##0.0,"
Unfortunately, the labels don't seem to read the commas and divide by one thousand, so I can't accurate display thousands or millions. A value of 1000 in the above code will display as $1,000.0 instead of the desired $1.0.
Format the values in the worksheet, and then just read them with VBA. Basically, I use conditional formatting to properly display the values on the sheet, and then read them with .DataLabel.Text = Cells(r,c)
Unfortunately, though the data is formatted correctly, the values are unchanged and the labels display with no custom formatting at all.
Is there any reasonable way to achieve my goal? I'm hoping there's a way to either (1) make commas count when changing data label number formats or (2) change the actual values of the data in my sheet based on the formatting drop-down selections (instead of just giving them custom formatting which leaves the value unchanged).
Thank you,
Lance
I think the words "conditional formatting" are your issue here: I've had problems with VBA reading the underlying format of a cell when it's conditionally formatted (admittedly, my issue was with colour, rather than number format, but I expect the reasons for it not working would be the same).
If you adopt your second approach, i.e. relying on the worksheet's format using the chart's "Linked to source" option, then on a trigger of when the drop-down option is changed, you could use VBA to set the format on the worksheet instead of using conditional formatting - then the chart would pick up whatever format you're using.
Please try this:
?Format(1000,"$#,##0.0,")
$1.000,0
?Format(1000,"$#,##0,.0")
$1,0
?Format(1234,"$#,##0,.0")
$1,2

Highcharts: Polar columns datalabels inside position

I'm trying to get values (datalabels) of a columns polar chart INSIDE the actual column, and not on top of it. I've set inside: true property but it does not seem to have any effect, although it works pretty nicely while using a regular stacked columns chart for example.
Here is the fiddle showing the issue: http://jsfiddle.net/deurk/BeVyt/2/
Ideally, I'd like to have the datalabels in their "shares" if there is enough space, with white color. Does anyone have a workaround for this?
Thanks!
Indeed it looks like a bug, so I've reported it here https://github.com/highslide-software/highcharts.com/issues/1688