Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
Not applicable

hide complete pivot, when one field is null

Hi everybody,

I Need to solve one Problem with useless Pivot-table-data.

I have a Pivot-table, which Shows all items, when there are items.

But I have docnums as well which have no items.

Now I wanted to hide the complete table, when no docnum is there to be shown.

I tried with a conditional Show, but this does not work.

IF(Count(distinct [docnum]) = 0,1)

Does somebody can help me with that Topic?

Thanks in advance.

Chris

1 Solution

Accepted Solutions
MVP
MVP

Re: hide complete pivot, when one field is null

I think the table will be shown if the if() statement returns NULL, so you would need to explicitely return zero:

IF(Count(distinct [docnum]) = 0,0,1)

[and it's a show conditional, 1 is show chart, 0 is hide chart]

View solution in original post

6 Replies

Re: hide complete pivot, when one field is null

Let's say one of your expression in this pivot table is Sum(Sales), you can try this as your layout condition:

Len(Trim(Sum(Sales))) > 0

MVP
MVP

Re: hide complete pivot, when one field is null

I think the table will be shown if the if() statement returns NULL, so you would need to explicitely return zero:

IF(Count(distinct [docnum]) = 0,0,1)

[and it's a show conditional, 1 is show chart, 0 is hide chart]

View solution in original post

Not applicable

Re: hide complete pivot, when one field is null

Hi Stefan,

thank you very much. It works now.

But I have a "Little" other issue now.

Now the table is hidden, when there is no docnum. Thats very good

But when I select nothing in qlikview the table is shown, because it "can have" lots of docnums

When nothing is selected in qlikview the table should be hidden too.

Do you have an idea?

Chris

Re: hide complete pivot, when one field is null

What if you add another condition

If(Count(distinct [docnum]) = 0 or Len(Trim(GetCurrentSelections())) = 0, 0, 1)

MVP
MVP

Re: hide complete pivot, when one field is null

IF(Count(distinct [docnum]) = 0,0,1) and not isnull(GetCurrentSelections())

Not applicable

Re: hide complete pivot, when one field is null

Thanks everybody, it works now.

Chris