Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

reshmakala
Contributor III

Conditional Show of columns in a pivot table at different levels

Hello all,

I have a pivot table which expands 3 levels. I have three expressions which I need to show conditionally as I expand the hierarchy.

Example:

My hierarchy:

A-> B-> C

When the hierarchy is not expanded initially, I need to show Expression 1 and when I drill to B from A, I need to hide Expression 1 and show Expression 2. When I drill from B to C, I need to hide Expression 2 and show Expression 3.

I have tried setting conditional show for the dimensions and set the condition for expression as GetSelectedCount(A)>0 etc but my users want the whole tree structure and when I make selections the expressions relate only to the selections made,

Is there any solution to this?

Thank you in advance.

Reshma

1 Solution

Accepted Solutions
Not applicable

Re: Conditional Show of columns in a pivot table at different levels

Hi,

See the attached qvw file.

Regards,

Jemimah

9 Replies
giakoum
Honored Contributor II

Re: Conditional Show of columns in a pivot table at different levels

try to use dimensionality()

MVP
MVP

Re: Conditional Show of columns in a pivot table at different levels

Are you using a drill group? If not, there is no way to detect an expansion of the hierarchy as there is no property or event fired to indicate that. If you are using a drill group, then GetCurrentField() will return the drill level.

I suggest that you post a sample model and indicate what you would like to achieve.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
reshmakala
Contributor III

Re: Conditional Show of columns in a pivot table at different levels

I am not using a drill group. It is a normal expansion. Attached is a sample file.

reshmakala
Contributor III

Re: Conditional Show of columns in a pivot table at different levels

Thank you! I hope Dimensionality() works in my case. But can you please explain me how the condition can be written? I had put Dimensionality() = 2 as condition for expression but doesn't seem to work. Attached is the sample file.

giakoum
Honored Contributor II

Re: Conditional Show of columns in a pivot table at different levels

it will not make the column to disappear, but it will show null :

if(Dimensionality()=1,sum(Amt1)) etc.

reshmakala
Contributor III

Re: Conditional Show of columns in a pivot table at different levels

Thank you for this but I wanted to hide it completely at higher levels. Thank you again.

Not applicable

Re: Conditional Show of columns in a pivot table at different levels

Hi,

See the attached qvw file.

Regards,

Jemimah

reshmakala
Contributor III

Re: Conditional Show of columns in a pivot table at different levels

Thank you!!

nurflechl
New Contributor III

Re: Conditional Show of columns in a pivot table at different levels

Hello Jemimah,

thanks for the .qvw. I've used your solution an it works. Now I'd like to complete the solution by making the Expression label conditional. I've tried to used the dimensionality() but it does not work. Do you have any idea how can i handle this?

I'm attaching the test.qvw, which is edited by me with a trial with dimensionality().

Regards,

Nur

Community Browser