Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

show/hide of columns in a pivot table

Hello together,

I have a list box

Listbox
customer 1
customer 2

and a Pivot Table:

amountcustomer 1customer 2
21212121
52125212

Could you help me, that I get this view (customer 1 is active)

Listbox
customer 1
costumer 2

Pivot Table:

amountcustomer 1
21212121

if the customer 2 in the listbox is active, the pivot showing the amount and the customer 2 view.

Could you help me to solve this problem.

Thank you.

1 Solution

Accepted Solutions
Not applicable

Re: show/hide of columns in a pivot table

HI ,

    The Values Present in the ListBox for Customer1 and Customer2 so use the same text in the Expression mentioned below .

I see at present the text in the ListBox is "Customoer 1" but we gave solution with the text as "Customer1" .

So include the text "Customer 1"(Same as present in the ListBox ) in  the Expression below,

= if(IsNull( GetCurrentSelections()) ,0,SubStringCount(GetCurrentSelections(), 'Customer 1'))

and for Customer2 conditional expression

= if(IsNull( GetCurrentSelections()) ,0,SubStringCount(GetCurrentSelections(), 'Customer 2'))

Please let me know if there is anything .

//Yusuf

6 Replies
nirav_bhimani
Contributor III

Re: show/hide of columns in a pivot table

Hi,

You can try this.

=SubStringCount(Concat(listbox,'|'),'customer2 ') in Expression tab conditional

Regards,

Nirav Bhimani

Not applicable

Re: show/hide of columns in a pivot table

HI ,

      Try to have the Expression in the Conditional Box of each Expression

for column Customer1 confditional

= if(IsNull( GetCurrentSelections()) ,0,SubStringCount(GetCurrentSelections(), 'Customer1'))

and for Customer2 conditional expression

= if(IsNull( GetCurrentSelections()) ,0,SubStringCount(GetCurrentSelections(), 'Customer2'))

//Yusuf

Not applicable

Re: show/hide of columns in a pivot table

Hello Nirav,

sorry it doesn't work, where is the expressio tab, where can i find it?

Not applicable

Re: show/hide of columns in a pivot table

Hej,

it doesn't work, it shows only a 0 in the column. If I click one of the listbox, the other column is visible.

Do you know why?

Not applicable

Re: show/hide of columns in a pivot table

HI ,

    The Values Present in the ListBox for Customer1 and Customer2 so use the same text in the Expression mentioned below .

I see at present the text in the ListBox is "Customoer 1" but we gave solution with the text as "Customer1" .

So include the text "Customer 1"(Same as present in the ListBox ) in  the Expression below,

= if(IsNull( GetCurrentSelections()) ,0,SubStringCount(GetCurrentSelections(), 'Customer 1'))

and for Customer2 conditional expression

= if(IsNull( GetCurrentSelections()) ,0,SubStringCount(GetCurrentSelections(), 'Customer 2'))

Please let me know if there is anything .

//Yusuf

nirav_bhimani
Contributor III

Re: show/hide of columns in a pivot table

HI,

Go to your pivot table properties > Expression Tab in the top right corner check conditional and then paste the the expression for each Expression like.

=SubStringCount(Concat(FiledName,'|'),'value')

Also find the attachment for more detail.

Regards,

Nirav Bhimani

Community Browser