Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
is there a way to get the number of lines of a Straight Table ?
Thanks
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 ?
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))
I have ~10 dimensions .. and this trick doesn't seem to work, i have less lines than the result of your formula
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))
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"))