Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
I'd like build a bar graph programatically via macro script.
I found sometihig like this in API tutorial
set Graph = ActiveDocument.Sheets("Assistenza").CreatePieChart
Graph.AddDimension "C_ARTICOLO_8"
Graph.AddExpression "sum([Quantità transazione])"
Graph.AddExpression "sum(%)"
end sub
My problem is thsat the Expression in not a function of any DIMENSION but values coming from another linear table.
Is there any function or method allow me to build a dimension with values from another table(graph).?
Something creating dimension on the fly?
Thank you for reading y post.
Denis Matteazzi
Hi Denis,
Sound like you need AGGR.
AGGR will create a "virtual" chart in memory and you can then apply other functions (e.g. SUM, MAX, AVG, etc.) to the results.
AGGR can also be used to calculate dimensions.
Have a look in the help file. If you can't find what you are looking for, post a more detailed example of your query and we may be able to show you how to achieve what you are doing.
Regards,
Stephen
Hi thank for the quick answer but i don't know if AGGR could help me.
I have a linear table like this:
col1 col2 col3 col4 col5 res = function(col1,col2,col3,col4,col5)
Item1 10 3 5 7 8 2,5
Item2 3 4 3 1 3 1,8
I'd like use Art1,Art2 as values for bar graph (it's ok because Item1 and Item2 is already a DIMENSION) and the value of res for the expression.
Is there any way of make programatically a DIMENSION starting from values of res?
I hope it's clear,,but I doubt 🙂
I recommend that you build an example and post it here, it will be easier for people to offer solutions.
I added as an attachment the qlick file so you can help me with an example.
Thank you very much.
no attachment - please double check
it seems like I am not allowed to upload the attachment. Everything seems to be ok but I can't see my att.
here