Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Conditional hide rows in dimension

Hi all!

I'm newbie in QlikView and this is my first post.

The users requirement is as follows. We have two dimensions (concept 1 and concept2) in a pivot table chart. They want to hide the rows when the second dimension has only one occurrence, and keep the total in the first dimension:

2014-06-05_1534.png

Does anyone know any way to get it?

 

Thanks in advance!

Cheers,

Xavi F.

8 Replies
annafuksa1
Contributor III

Re: Conditional hide rows in dimension

Hi, you need to use calculated dimension

please attach file with data.

Not applicable

Re: Conditional hide rows in dimension

What is actual result and expected result, are they concept1 and concept2? Can you provide some more explanation for your problem?

Not applicable

Re: Conditional hide rows in dimension

Is concept1 a count and concept2 a category?

Not applicable

Re: Conditional hide rows in dimension

ACTUAL RESULT is the result that I have at the moment.

Concept 1 and Concept 2 are two dimensions. Concept 1 is the first dimension (bold font style) and Concept 2 the second one (normal font):

2014-06-05_1742.png

SPECTED RESULT is that I want to get. I want to hide Concept 2 when it has only one row, i.e: Concept 1 'Machines and Accesories' has only one ocurrence in Concept 2, then I don't want it apears in the table. Concept 1 'ITIS' has two ocurrences in Concept 2 ('Hardware' and 'Maintenance'), then they sould be present in the table:

2014-06-05_1740.png

Not applicable

Re: Conditional hide rows in dimension

fieldvaluecount might be what you need.

So in your conditional expression for Concept1:

if(FieldValueCount(Concept2) > 1, 1, 0)

Not applicable

Re: Conditional hide rows in dimension

Here is the syntax for fieldvaluecount:

fieldvaluecount(fieldname)

Returns the number of distinct values in a field. Fieldname must be given as a string (e.g. a quoted literal).

Not applicable

Re: Re: Conditional hide rows in dimension

Hi Jacob,

Thaks for your answer.

I've been testing with FieldValueCount as you proposed and other functions (Count, Count Distinct, RowNo,...) and I did not get the expected result.

Can you explain it in more detail, please?

I attached the qvw file

Thanks!

Xavi F.

Not applicable

Re: Conditional hide rows in dimension

Hi all!

I have continued to test but I have not found the solution.

I created an expression that counts how many rows appear in DIM2 for each value of DIM1, but I can not use the same formula in the dimension definition (see attached qvw file).

Any suggestions?

Thanks!

Xavi F.

Community Browser