Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
I have a straight table with 9 dimensions and four expressions column.
Out of the 9 dimensions, 3 are calculated dimensions.
I wrote a macro:
sub temp
set obj = ActiveDocument.GetSheetObject("CH873")
ActiveDocument.Variables("vNoOfRows").SetContent obj.GetRowCount, true
end sub
This macro is giving me the current row count.
But my user does not permit the use of macros, hence I will have to write expressions in a text box to display the number or rows.
The expression I wrote is:
count(distinct(dim1 & dim2 & calculated dim 3 & calculated dim 4 & dim 5 & dim 6 & dim 7 & calculated dim 8 & dim 9))
This is not giving me a correct value.
Kindly help me write an expression for the same purpose
Regards,
Vishal
Also can you explain me how does this count(dim 1& dim 2 etc.) i.e count of multiple dimensions work?
Use this one
=Count(Dim1)+Count(Calcuted dim1) and go on....
I am afraid this is not giving me the correct result. In fact the value is far from being close to the actual number.
Also your expression counts the number of entries for each dimension separately. Hence I assume this is not the correct approach.
Hi Vishal,
Counting the dimension may not give you the row count. Say for example, if certain combination of dimension return zero value to all your four expressions then those dimension row will not appear in your straight table, but in the count of dimension system will consider it.
Not sure whether the below expression helps you, just give a try
= Count(Aggr(Sum(expression), Dim1, dim2,..))
Hello Gowri,
I think you are right. This is not the right approach. I will try the expression suggested by you.
Did you try the function NoOfRows with the total argument ?
NoOfRows(total) returns for a line of the report the total number of lines of the report.
Fabrice
Yeah I did! Unfortunately it returned 1
With the total qualifier ? => NoOfRows(total)
the help says " Returns the number of rows in the current column segment in a table or, in the case of bitmap charts, in the chart's straight table equivalent.
If the chart is one-dimensional or if the qualifier total is used as argument, the current column segment is always equal to the entire column. "
It always worked fine for me.
Fabrice