I have a matrix which sums sales to a customer by Month/Year.
Rows - Customer Name, Sum(NetSales)
Columns - Month/Year
What I want to capture is the total number of rows in the matrix.
For example, I am passing the report 144 records from my query; however
there are only 35 distinct customers.
Is there a function or property of the matrix that will give me this
information? I am currently doing a SELECT DISTICT on customer no in
another query to get this result.Using the CountDistinct Aggregate would do the job so you would not
need the second query.
Showing posts with label sums. Show all posts
Showing posts with label sums. Show all posts
Wednesday, March 21, 2012
Monday, March 19, 2012
Matrix region formulas
Hi,
I would like a Matrix report with
Jan, Feb, Mar, Total on columns
where total sums up all the month values in that row.
And something like
2003, 2004, Difference2003-2004 on columns
AddColumn does't seem to do the trick
Thanks!Sorry, the first one I see I can do with the "Subtotal" option but what
about "average for the subtotal
"BoruRR" wrote:
> Hi,
> I would like a Matrix report with
> Jan, Feb, Mar, Total on columns
> where total sums up all the month values in that row.
> And something like
> 2003, 2004, Difference2003-2004 on columns
> AddColumn does't seem to do the trick
> Thanks!
I would like a Matrix report with
Jan, Feb, Mar, Total on columns
where total sums up all the month values in that row.
And something like
2003, 2004, Difference2003-2004 on columns
AddColumn does't seem to do the trick
Thanks!Sorry, the first one I see I can do with the "Subtotal" option but what
about "average for the subtotal
"BoruRR" wrote:
> Hi,
> I would like a Matrix report with
> Jan, Feb, Mar, Total on columns
> where total sums up all the month values in that row.
> And something like
> 2003, 2004, Difference2003-2004 on columns
> AddColumn does't seem to do the trick
> Thanks!
Matrix order of totals
I have a matrix that shows sums by month. The dataset returns both month and quarter. I want to have subtotals by Quarter. I have this working and the matrix returns columns as follows:
Jan Feb March Q1 April May June Q2 ... Total
Jan Feb March Q1 April May June Q2 ... Total
What I would like to have is
Jan Feb March April May ... Q1 Q2 Q3 Q4 Total
Is there anyway to have subtotals displayed at the end of the row?
For dynamic groups (e.g. quarter), the subtotals are always part of that group. They currently cannot be moved out of that group instance.
Another way of doing this, is to use a table in the report with explicit columns for Jan, Feb, ..., Dec, Q1, ..., Q4, Total. You would then need to use expressions to calculate your month/quarter/year aggregations.
-- Robert
Monday, March 12, 2012
Matrix Groups and Sums
I have what I thought was a pretty simple report, but have encountered two
issues.
I have three groups in this report.
1. When using sum on my detail row I am getting what appears to be a running
total in one of the columns. When I don't use sum then I get either the first
or last value for a detail record.
2. When using groups, the results are not what I would expect. It seems
almost impossible to get the grouping I would like. If I want to total on the
first group and then the second group and then a final total for all the
groups I can't. Am I missing something as this seems like it should be a
trivial effort.
If anybody can help I would appreciate it.
--
DCDUse Fields!fieldname.value (sounds like you are getting sum, first, and
last)... do not use a function at all..
Look at the sum documentation,, there is an additional parameter which
allows you to set the scope, Use a group name there and see if that helps...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Darryl" <ddillman@.tmsteam.com> wrote in message
news:F1127546-8532-4873-A11B-B6A7D3B8897E@.microsoft.com...
>I have what I thought was a pretty simple report, but have encountered two
> issues.
> I have three groups in this report.
> 1. When using sum on my detail row I am getting what appears to be a
> running
> total in one of the columns. When I don't use sum then I get either the
> first
> or last value for a detail record.
> 2. When using groups, the results are not what I would expect. It seems
> almost impossible to get the grouping I would like. If I want to total on
> the
> first group and then the second group and then a final total for all the
> groups I can't. Am I missing something as this seems like it should be a
> trivial effort.
> If anybody can help I would appreciate it.
> --
> DCD
issues.
I have three groups in this report.
1. When using sum on my detail row I am getting what appears to be a running
total in one of the columns. When I don't use sum then I get either the first
or last value for a detail record.
2. When using groups, the results are not what I would expect. It seems
almost impossible to get the grouping I would like. If I want to total on the
first group and then the second group and then a final total for all the
groups I can't. Am I missing something as this seems like it should be a
trivial effort.
If anybody can help I would appreciate it.
--
DCDUse Fields!fieldname.value (sounds like you are getting sum, first, and
last)... do not use a function at all..
Look at the sum documentation,, there is an additional parameter which
allows you to set the scope, Use a group name there and see if that helps...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Darryl" <ddillman@.tmsteam.com> wrote in message
news:F1127546-8532-4873-A11B-B6A7D3B8897E@.microsoft.com...
>I have what I thought was a pretty simple report, but have encountered two
> issues.
> I have three groups in this report.
> 1. When using sum on my detail row I am getting what appears to be a
> running
> total in one of the columns. When I don't use sum then I get either the
> first
> or last value for a detail record.
> 2. When using groups, the results are not what I would expect. It seems
> almost impossible to get the grouping I would like. If I want to total on
> the
> first group and then the second group and then a final total for all the
> groups I can't. Am I missing something as this seems like it should be a
> trivial effort.
> If anybody can help I would appreciate it.
> --
> DCD
Subscribe to:
Posts (Atom)