Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Share Chart between Sheets based on Parameters?

Hiya Guys,

I'm new to QlikView - so apologies if this is an obvious question:

Is it possible to create a Chart once (say, based on "Company") and then use it again on another Sheet (same style, etc. but say, based on "Customer")? - ie: reuse the same Graph but pivot/change the Categories/Series depending on which Sheet it is being displayed? (or depending on a given parameter?).

We have a Consultancy firm who have, so far, produced all our Dashboards - and it appears all objects are just 'copies' of one another, but with subtle differences between Sheets.  Being a Software Engineer by trade - my initial thought/requirement is to "create once and use many times".

If this isn't possible - it really should be... and if this is a simple question - I apologise!  🙂

Thanks in advance for your input.

Cheers,

Steve.

1 Solution

Accepted Solutions
Not applicable
Author

The copy method creates separate sheet objects. It seems that Steve wants one master object that can be modified and affect all objects that derive from that object.

What maybe possible is to create a master chart with all the permutations of dimensions and expressions. Use conditionals to control which dimensions and expressions to display on which sheet (use linked objects so that changes in one object will be reflected in all objects). Charts do not know which sheets they are in but one workaround is to create a table with the list of sheets and select the correct sheet name via a sheet activate trigger. The conditional should be able to check the field to display the appropriate dimension or expressions.

I've attached a test qvw that has one object that is displayed differently on different sheets. The limitation is that object can only be used once per sheet.

Leave it up to engineers to make something overly complicated just to make it simple.

Update: I forgot about the GetActiveSheetId function. You can use the GetActiveSheetId function instead of a table sheet name. I updated the test qvw to use the function.

View solution in original post

3 Replies
Not applicable
Author

Yes, you can do it. Right click on chart -> clone or copy to clipboard -> object. Then drag and drop new chart into desired tab.

In the new chart -> right click -> Properties -> Dimensions -> Change Company to Customer.

I hope, this helps.

Not applicable
Author

The copy method creates separate sheet objects. It seems that Steve wants one master object that can be modified and affect all objects that derive from that object.

What maybe possible is to create a master chart with all the permutations of dimensions and expressions. Use conditionals to control which dimensions and expressions to display on which sheet (use linked objects so that changes in one object will be reflected in all objects). Charts do not know which sheets they are in but one workaround is to create a table with the list of sheets and select the correct sheet name via a sheet activate trigger. The conditional should be able to check the field to display the appropriate dimension or expressions.

I've attached a test qvw that has one object that is displayed differently on different sheets. The limitation is that object can only be used once per sheet.

Leave it up to engineers to make something overly complicated just to make it simple.

Update: I forgot about the GetActiveSheetId function. You can use the GetActiveSheetId function instead of a table sheet name. I updated the test qvw to use the function.

Not applicable
Author

Thanks vhuynh - this is exactly what I was after.

Under the "Dimensions" Tab - using the "Enable Conditional" checkbox does the trick... and I should be able to control other featues (such as the Chart Caption) using nested "If" statements, eg:

=If(GetActiveSheetID()='Document\SH01', 'Sheet 1',

If(GetActiveSheetID()='Document\SH02', 'Sheet 2','Other'))

I will no-doubt find other limitations where I require dynamic settings on an atribute without the build ("...") button - but I'll jump off this bridge when I come to it! (incidentally, I assume if there is an atribute which is not accessable within an Object's "Properties" then it is not accessable via other means? - ie: within a VBScript Module?).

Cheers,

Steve.

PS:  Your comment "Leave it up to Engineers to make something overly complicated just to make it simple." is so brilliant I would like permission to use this as a Signature...  🙂