Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have a chart with:
Chart Type – Bar Chart
Dimensions – Month
Dept
Expression – Sum(Total)
I have Checked-In the Invisible checkbox for the expression Sum(Total) so the Bars of the chart will not show and I have Checked-In the Linear in the Trend-lines.
Since the Month dimension is first, the Months’ values are on the X axis and the Departments legend are listed vertically on the right.
That results in a view of only the Trend-lines of each department over the months. (Since there are more than 5-6 departments the view tend to be cluttered when the bars and the trendlines are all viewable)
I wish to view the Bars which constitute the linear trend-line when a single department is selected.
I assume it needs to be done in VB code in the Edit Module. (can it be done otherwise?)
Does anyone know how?
Thanks in advance.
Josh
PS I attached a sample application that will help understand by dilemma
hi ,
can you check this & let me know if it's a solution 4 ur problem ...
if not let me know where i'm getting wrong
thanks
Meher
Nice solution!
Make a linked chart and make one conditionally disappear when single Dept is selected and vice versa.
There's got to be a way though to change that via code.
I like your approach nonetheless.
Thanks
Yes, you can do it with macro , but i'm not a expert in VB scripting & i don't prefer macro's too which are not good in standards of performance & sometimes they fails too (in ZFP) ...
thank you
Meher
Wow ,
thats really a nice peice of code
Meher
Thanks!
From one coder to another
Exactly what I was looking for.
I am an expert programmer of Access nut not too familiar with the properties and methods of QlikView.
What or why the consecutive item(0) in
Set objExpr = objProp.Expressions.Item(0).Item(0).Data.ExpressionVisual
Since there is no Intellisense with the Editor where are the properties and methods of the different objects?
Thanks
The first Item(n) is the collection representing the Expressions, and it's 0-based (so Item(0) is the first expression). If you were looking instead at Dimensions, then it would be the collection of dimensions (and in this case, you would reference the .ExpressionData object instead of .ExpressionVisual.
As for the apparent collection under this collection (thus the next .Item(0)), I have not found documentation or been able to resolve why that's a collection. I examined the docs I could find, and exported the chart to XML in order to study, but it appears it's always just ONE member of this sub-collection (whether it be ExpressionData or ExpressionVisual). Perhaps QlikView is storing other members in this collection, but it seems all of the common properties are exposed under this first member.
The API Guide for QlikView may be downloaded from their site (Downloads section), which provides a lot of help on the object model. I'd like to see more, but it's a great place to start.
Much appreciated!
Thanks