Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
antyinteligent
Contributor
Contributor

expand only one field value in a pivot table (on open action)

Hi,

I'm reloading a dashboard daily. The Date is the primary dimension in a pivot table. I'd like to write a macro which would be run on open which would firstly collapse all [this is easy "TableProperties.PivotAlwaysFullyExpanded = False"] but then I'd like to expand the max(Date). I'm looking in "API Guide version 11" but i cannot find the property that is responsible for the field/cell being collapsed or expanded, could anyone help with this?

Regards

AM

5 Replies
Not applicable

Czesc Andrzej!

I would approach it with the use of bookmarks. Create bookmarks with all states of collapse / expand you need.

(You would need to utilise "Include Layout State" option of bookmark)

Then in macro just set a proper bookmark.

Attaching sample app, which utilises buttons, but you can easily add macros:

ActiveDocument.RecallDocBookmark "MyBookmark"

BR,

Kuba

antoniotiman
Master III
Master III

Document Property -> Trigger

On Open Document

Select in Field

Field : Date

Value : =Max({1} Date)

antyinteligent
Contributor
Contributor

Thanks for the good hint but I'm afraid that it cannot be utilized here because each day a new date value comes and this one should be expanded while other should be collapsed. The use of the bookmarks poses two problems here:

1. I wold have to create a table of dates in advance and for each of them I would have to create a bookmark

2. This is to be a long lasting project so it would have to be a long list of bookmarks [If i were to set up a bookmark via code i'd still need to know how to set the expand/collapse state that i require]

If I misunderstood your idea please let me know.

Not applicable

Hello Andrzej,

Sorry, somehow I missed the most important information, that you want to always exapnd a cell not a whole column.

As per my knowledge you can only collapse all / expand all via macro, not specific columns in a table, so this is not an option.

How about just adding additional fully expanded pivot table, showing information only for max(date)?

BR,

Kuba

antyinteligent
Contributor
Contributor

Hi,

it's a good suggestions. If there won't be any reply regarding the cell property i think I'll go with this one. Thank you

AM