Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to return the number of rows in my table as part of my expression label?
My table has conditional dimensions, so depending on what the user selects, it may display aggregate values or transaction level values. I would like my label to display "Avg Rent / Week" if the value is an aggregate, or just "Rent / Week" if the user has selected transaction level details.
I can determine if it is at the transaction level by comparing the count of rows in the table with Sum(PropertyCount). If the count of rows is less than Sum(PropertyCount), I will display "Avg Rent / Week", if the count of rows = Sum(PropertyCount), I will display "Rent / Week".
I have tried NoOfRows(), but it always returns 1.
If this does not work, an alternative may be to have two expressions (eg. Avg and Sum) and let the user choose which one to display.
Hi
select the component,open properties and in windows title use this
='String'& Count(fieldname)
just use the count(Dimension You are using)
Have you tried using NoOfRows(Total) ?
I know this will work in the body of a chart - but will return '1' if used in the title.
sujeet and Vishwanatha,
As I described in my initial post, I am using a set of conditional dimensions. The user could display any combination they want to, so those counts will not work. I am trying to compare the count of rows in the table to count of unique records in the fact table.
tresesco and Clark,
I have tried all combinations of RowNo() and NoOfRows() with and without TOTAL. The expression label appears to behave the same way as the chart title, and returns 1 in all situations.
Michael - can you post a sample QVW so we could see why it isn't working?
I have used NoOfRows(Total) in my apps many times for this result.
Hi,
Please find enclosed file,
It is showing total nos of rows as per your requirements
Regards,
Hi Max,
You are displaying the NoOfRows in the expression, not the expression header.
Well, if you want that in the header, you have to use aggr() like:
=Aggr(NoOfRows(Total),YourDimension)
See the attached sample, I have modified the max dreamer's sample file.
Note: In this case it is equivalent to =Count( Distinct YourDimension) // when single dimension is used in the chart
The dimensions are conditional. You cannot know at design time which ones the user is going to select.
That is the reason for the original requirement.