Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
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
swuehl
MVP
MVP

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
sunny_talwar

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

swuehl
MVP
MVP

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
Author

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

sunny_talwar

What if you add another condition

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

swuehl
MVP
MVP

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

Not applicable
Author

Thanks everybody, it works now.

Chris