Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

fredericvillemi
Contributor III

Get the number of lines of a Straight Table Chart ?

Hi,

is there a way to get the number of lines of a Straight Table ?

Thanks

5 Replies
fredericvillemi
Contributor III

Re: Get the number of lines of a Straight Table Chart ?

What i would like to do is to show the number of lines on the caption of the straight table ... and without macro if possible .. it seems not possible ?

whiteline
Honored Contributor II

Re: Get the number of lines of a Straight Table Chart ?

Hi.

You could just use count(distinct Dim1) if you have one dimension in the straight table.

For more than one dimension, you could try to use a trick with aggr():

=Count(aggr(1, Dim1, Dim2, Dim3))

fredericvillemi
Contributor III

Re: Get the number of lines of a Straight Table Chart ?

I have ~10 dimensions .. and this trick doesn't seem to work, i have less lines than the result of your formula

whiteline
Honored Contributor II

Re: Get the number of lines of a Straight Table Chart ?

Then you just have zeros for some combinations and checkbox 'supress zero values' is on.

Use your expression instead of just '1', for example:

=Sum(aggr(if(Sum(Value)<>0, 1, 0), Dim1, Dim2, Dim3))

Not applicable

Re: Get the number of lines of a Straight Table Chart ?

I have done this many times in a calculation condition to limit the number of rows in a table that otherwise might require millions of rows and consume too much memory.

If you have three dimension fields then the calculation is like this: Sum( Aggr( 1, field1, field2, field3 ))

If any of the dimensions are a cycle group then, instead of a field name, use this:  $(=GetCurrentField("mycyclegroup01"))

Community Browser