CountRows
May 25, 2007
I have a query structured to return products sold by date. I'm then grouping them by the year they were sold, and totalling up sales..etc. The problem is when I run my sql query that retrieves the data in the SQL designer, the query retrieves 97 rows. When I run the report, and check the number of rows returned (with CountRows()) I get 67. However the remaining 30 rows still show up and are grouped on the next page! Why is this happening?? Thanks!
View 5 Replies
Jan 9, 2007
Greetings,
I have a fairly simple report that displays one table (table1). The table
has a filter that I created by opening the properties of the table and
entering
=Parameters!abs_comparison.Value
in the Value field of the Filters tab. The filter operates on the
=Fields!Absolute_Comparison.Value
field.
The report displays the row count from the dataset (=CountRows("mfrep_rqw"),
but this value doesn't change when the filter is applied. I'd also like to
display the number of filtered rows, but I can't figure out how to do it.
Any ideas?
Thanks,
Mike Hayes
View 6 Replies
View Related
Nov 9, 2015
I'm using a Contoso database running on Power BI Desktop (Version: 2.28.4190.122). The databiase is actually a Contoso.pbix file provided for a book [URL]. I have a DAX query that summarizes a Products table by Product[Manufacturer] and gives a count of products by the manufacturers.My Problem is that the ORDER BY COUNTROWS doesn't work.
why the order by clause doesn't work when I'm confined to the Products table while the order by clause does work when I start with the Sales table? The numbers are correct in both queries.
This query doesn't sort
EVALUATE
SUMMARIZE (
Product,
Product[Manufacturer],
"ProductCount", COUNTROWS ( Product )
)
ORDER BY COUNTROWS ( Product ) DESC
This query does sort correctly
EVALUATE
SUMMARIZE (
Sales,
Product[Manufacturer],
"ProductCount", COUNTROWS ( RELATEDTABLE ( Product ) )
)
ORDER BY COUNTROWS ( RELATEDTABLE ( Product ) ) DESC
View 2 Replies
View Related