Showing posts with label groupings. Show all posts
Showing posts with label groupings. Show all posts

Monday, March 12, 2012

Matrix grouping

I have a report with the Month attribute as the column group and specific measures as the row groupings. Now, here's my delima. The months are not being displayed in order. They look like this:

Jan Feb May Jun Jul Aug Sep Oct Nov Dec Mar Total

Why is it doing this?

Here's a view of my matrix in layout view...

Month_Name

Fatal Crashes =sum(fatal_crashes.value)

Injury Crashes =sum(injury_crashes.value)

Property Damage =sum(Prop_Damage.value)

Total Crashes =sum(Total_crashes.value)

Chicago Crashes =sum(Chicago_crashes.value)

Crashes Located =sum(located_crashes.value)

% Located =sum(percent_located.value)

any help would be greatly appreciated!! THANKS!

Try changing the sorting of the matrix to use the month number if available.

http://msdn2.microsoft.com/en-us/library/aa179319(SQL.80).aspx

If it's not available, you may be able to build an ugly IIF statement to provide the row numbers, or use a function to return them.

cheers,

Andrew

|||

I tried to hardcode in a switch statement such as this one :

=Switch((Fields!Month_Name.Value) = "Jan", 1, Fields!Month_Name.Value = "Feb", 2, Fields!Month_Name.Value = "Mar", 3, Fields!Month_Name.Value = "April", 4, Fields!Month_Name.Value= "May",5, Fields!Month_Name.Value= "Jun",6, Fields!Month_Name.Value= "Jul",7, Fields!Month_Name.Value= "Aug",8, Fields!Month_Name.Value="Sep",9, Fields!Month_Name.Value="Oct",10, Fields!Month_Name.Value="Nov",11, Fields!Month_Name.Value="Dec",12)

But it didnt change anything. I also changed the sort to Fields!Month_Name.key and Fields!Month_Name.Level and nothing changed as well. I wonder if its because i added extra rows to the matrix ...but still it should work, i have added extra columns before and never had this problem.

Friday, March 9, 2012

Matrix Aggregation to a Column only

Hello,
I have a matrix report displaying data from a data cube, via analysis
services. It contains column groupings for Months, Quarters and Year as well
as row groups for Team, User and Region. This allows the user to drill down
from a top level "All Teams" total for the whole year, down to a full view of
a region for a particular month.
To achieve this, the "Sum" function is used to aggregate the figures. But,
we wish to also use a running total of Sales by region using Brought Forward
and Carried Forward balances. This needs to be aggregated by column (region
to user to team), but not by row. (Otherwise the Jan, Feb and March totals
are added together for example for Q1, which is incorrect).
Is there a way to specify the axis for the Sum function? Or another way to
create the report that still allows the drill-down/up functionality?
Many Thanks.
Ben Mann.Although I don't understand the business part of your question... Matrix
allows aggregations to be done on rows OR columns... It looks like you
wanted some aggregation on both axes... Matrixes can do this...
Also you can use any of the aggregate functions that RS supports, take a
look at runningvalue... that might be what you are lookin for...
--
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
"Ben Mann" <Ben Mann@.discussions.microsoft.com> wrote in message
news:37B6B96A-FF6F-4D63-A820-B6E588C13233@.microsoft.com...
> Hello,
> I have a matrix report displaying data from a data cube, via analysis
> services. It contains column groupings for Months, Quarters and Year as
well
> as row groups for Team, User and Region. This allows the user to drill
down
> from a top level "All Teams" total for the whole year, down to a full view
of
> a region for a particular month.
> To achieve this, the "Sum" function is used to aggregate the figures. But,
> we wish to also use a running total of Sales by region using Brought
Forward
> and Carried Forward balances. This needs to be aggregated by column
(region
> to user to team), but not by row. (Otherwise the Jan, Feb and March totals
> are added together for example for Q1, which is incorrect).
> Is there a way to specify the axis for the Sum function? Or another way to
> create the report that still allows the drill-down/up functionality?
> Many Thanks.
> Ben Mann.

Wednesday, March 7, 2012

Matrix - Column Grouping

I am using Matrix table for one of my reports
.
I would like to have three column groupings; where first grouping is
default. Other two should be based on the parameter selection. If '<None>'
is selected from the parameter option I do not want to show that secondary
grouping.
Is it possible?I'm not sure what you are trying to do.
If you just want to dynamically toggle the visibility of groups within a
matrix, you should install and check out the sample reports (e.g.
CompanySales.rdl). Also read BOL:
http://msdn.microsoft.com/library/en-us/rshowto/htm/hrs_designer_v1_0zvx.asp
However, if you want to statically "hide" detail groupings based on
parameter values you should use a dynamic column grouping expression based
on IIF. If you want to always "hide" a certain inner grouping based on a
parameter value, you would just group on a constant (and make sure to use a
similar expression for the column grouping label):
=iif(Parameters!P1.Value = "None", 1, Fields!ProductCategory.Value)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"RA" <rchaudhary-nospam@.storis.com> wrote in message
news:OTVO0hGZEHA.2840@.TK2MSFTNGP11.phx.gbl...
> I am using Matrix table for one of my reports
> .
> I would like to have three column groupings; where first grouping is
> default. Other two should be based on the parameter selection. If '<None>'
> is selected from the parameter option I do not want to show that secondary
> grouping.
>
> Is it possible?
>