Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Matrix Report:Adding Average Column/Sorting Based On Last Month/Conditional Formating


 

I have a matrix report with 2 column SaleAmount and ProfitAmounts by Month like


                   Sale                                         Profit
Dealer    5/1/2007   6/1/2007   7/1/2007   5/1/2007   6/1/2007   7/1/2007
   A           100           200           300        20              25           15
   B           200            250           50         30             45             19
 
 
how can i do following 3 things
 
 
1)Add Total column for Sale  and Average column for Profit
2)Sort report by lastMonth of Sale (here 7/1/2007) High to low
3)if last month of sale(here 7/1/2007) is less than second last month here (6/1/2007) whole row should be red
 
thanks
 




View Complete Forum Thread with Replies

Related Forum Messages:
Conditional Formating Based On Second Dataset.
I have two databases located on seperate machines, using different platforms and credentials.

I have setup  dataset1 source to the first database wich provides me the following colums

Incident_id, description, date, status.

And dataset2 datasource provides

incident_id, is_billable

My report is a tabular report showing the four fields from dataset1.

I am trying to apply some conditional formating wich will link the two datasets on the incident_id field.

something along the line of if the dataset1.incident_id is in dataset2.incident_id then turn it red.

I tried using the below expression on the color property but the IN part is not allowed.

=iif(Fields!INCIDENT_ID.Value,"Dataset1" in Fields!INCIDENT_ID.Value,"Dataset2","Black","Red")

View Replies !
Matrix Report Column Headers Are Not Sorting Properly
Hello,

When I build a matrix report, based on a cube, the Month Numbers are the column header and the sorting is incorrect. It sorts it as 1, 10, 11, 12, 2, 3... So the report looks kinda like this:
             1      10     11     12      2      3      4
North
South
East
West

 

However, when I build off the same cube, using a model in Report Builder, the header for those same Month Numbers sort correctly.

I checked that the Order By, for the Dimension, is set to Key.

Does anyone have a suggestion on how to make the colum headers sort correctly in a Matrix Report?

Thank you for the help.

 

View Replies !
SSRS--Adding Static Column To A Matrix Report .Plz Help!!
Hi,

I need to have a Matix report which looks like :

...............|YEARS
--------------------------------
...............|Class1|Class2|Class3
Programme|StudNo|StudNo|StudNo

Column--Years SubColumn--Class1,Class2,Class3
Row --Programme
Data --No of Students


ie; The Matix will look like this

Programme|.......2001.................|........200 2............|.
------------------------------------------------------------------------
..............|Class1|Class2|Class3|Class1|Class2| Class3|.....
IT...........|..23...|...24..|..45....|..12...|..2 3...|..12..|.....
MBA........|..34...|...12..|..12....|..31...|..13. ..|..14..|.....


I don't know how to split the YEARS' column into 3 different subcolumns which has got class1,class2,class3.Each year has got the 3 different staic column headers as class Names. Under that the no of students in each class comes. The students in each class in each year should be calculated based on some condition which is not available directly from a dataset. Hope u can understand the matix.

PLEASE HELP!!!


Thanks & regards,
Payal

View Replies !
Coloring Matrix Report Based On RowNum And Column Num
 

Hi,
 

I want to color matrix report based on the rowNumber and ColumnNumber.I have able to get the data but no luck in getting the color yet.
 
I have wrritten function but I am not geeting correct rowNumber like in this case.Also to my surprise I can't pass rowNumner(Nothing) for my second parameter,it gives error.
 
Current,Current intersection should get RowNumber as 1 Current and 30 intersection should get rownumber 2
 
 
Public Function GetBackColor(Byval ColumnName AS String,ByVal RowNum As Integer) AS String
  IF (ColumnName = "Current")
         Return  Switch(RowNum=1,"Transparent",RowNum>1,"Silver")
 End If
 IF (ColumnName = "D30")
         Return  Switch(RowNum=1,"Green",RowNum=2,"Transparent",RowNum>2,"Silver")
 End If
 IF (ColumnName = "D60")
          Return Switch(RowNum>0 AndAlso RowNum<3,"Green",RowNum=3,"Transparent",RowNum>3,"Silver")
 End If
End Function
 
 







Portfolio Status
Current
30
60
90+
BK Non Perf
BK Perf
Collection
Consumer
Foreclosure
Legal
Payment Plan
REO

Current
402
52
1
 
 
1
 
 
 
 
1
 

30
22
21
32
1
 
 
 
 
 
 
1
 

60
3
3
9
17
1
 
5
1
13
 
1
 
 
Any suggestion will be appriciated
 
-Thanks,
Digs
 

View Replies !
Formating Drill Down On SubTotal Column In Matrix
Hello Experts,

I have a Matrix in my report where on each each cell i have a drill down to another report. The Matrix also has SubTotal Column getting generated.

But the Problem is the drill down report gets carried on the SubTotal column also and the user gets vage results as proper information is not passed to another report.

Is there a way through which if its a subTotal cell then i can hide the drill down. some IIF() condition is there is

 

I appreciate if somebody can help me address this problem.

 

/Soni

 

 

View Replies !
Sorting Matrix Report
I have created a Matrix report with 5 row groups (Company and ProductName, ProductEndDate), one column group (Status) and two data columns(Amount & Count).



The report works fine except that it does not sort properly. I want to sort the data by Company, ProductEndDate, ProductName.

I took the following steps -- I highlighted the matrix and in the properties dialog box, selected the groups tab. In groups I selected each row group, hit the edit button, clicked the sorting tab and Company, ProductEndDate, ProductName.
 
 
 

View Replies !
Sorting A Matrix Subtotal Column
I have a matrix with the rows consisting of customers and the columns consisting of different revenue streams. The revenue streams are totalled using the matrix subtotal feature. I would like to sort, either interactively or statically (if that is the only option) by the subtotal column. I've read through everything I can find online and even the solutions that appear to be appropriate do not work. Can anyone give me a suggestion? 
 
Thanks,
Zack Gallinger

View Replies !
Problem Sorting A Matrix Report
I have created a Matrix report with 5 row groups (customers and store locations), one column group (division) and two data columns -- Sales Dollars and Percentage.

The report works fine except that it does not sort properly. I want to sort the customer rows in descending order by sales dollars. My top customer in dollars should appear first and so on.

I took the following steps -- I highlighted the matrix and in the properties dialog box, selected the groups tab. In groups I selected each row group, hit the edit button, clicked the sorting tab, and changed the

View Replies !
Sorting Matrix Column In Random Order
 

Hi,
 
I have a matrix report...the column results
are as follows
 
Con Std , Con Access, SF Std, SF Acc, Broadband, Pay TV
 
how would i make the columns appear in the above order when displaying as it is default alphetically sorted...I have tried putting numbers at the front which work till I get to the number 10 which alphetically sorted is next to 1 not 9?
is there a better way off sorting matrix column which have no specific criteria to sort from?
 
thanks

View Replies !
Conditional Formatting In A Matrix Report
Hi,

 

I have a simple matrix table that shows sales by year and by period for a selection of sales offices.

I would like to have some conditional formatting in the table so that if for example period 1 sales in 2007 were less than period 1 sales in 2006, the b/g colour would be red, if the sales showed a 10% increase they the b/g colour would be green.

I understand the expression editor in the b/g colour setting, and have used this to great effect in other reports....but how to use in a matrix??

 

someone give me a pointer?

 

Thx

 

View Replies !
Conditional Color In Matrix Subtotal Column
I am using matrix in my report with calculated fields, for example I have 3 columns : Actual amount, Budget and Variance. Variance should be in Red if it is negative. I can set up an expression to change the color on the row level, but not in Subtotal ot Total row. I cannot use sum of Fields! values, because Budget amount is also calculated field based on the "Category" value which is columns group on the matrix.

So anyway, if I am trying to reference ReportItems!Variance.Value in Subtotal Level, it gives me an error about group scope.

How can I access the cells values in subtotal and total group levels? If anybody knows any tricks for this fairly simple task?

Thanks for your help.

Olga

 

View Replies !
Sorting Text File Based On Any Column
Hi All,
Is there any command which will sort data in text file based on 3rd column (based on any column)?
Thanks
Sanjeev

View Replies !
Conditional Number Format On Specific Matrix Column Group
I'll try to make this simple. I'm on SSRS 2005 and I have a report with a matrix object that has one row group and one column group. I need to switch the number format only for values where the column group has a specific value.
 
For example, here are the records in the table:
Customer, Type, Amount
Customer1, Revenue, -100
Customer2, Cost, 60
Customer1, Revenue, -200
Customer2, Cost, 125
 
By default the matrix object shows the following (the total comes from the standard subtotal on the column group):
                     Revenue         Cost           Total
Customer1          -100             60             -40
Customer2          -200            125            -75
 
But the users need the report to look like this, with all positives (why, oh why?!  ):
                     Revenue         Cost           Total
Customer1          100             60              40
Customer2          200            125             75
 

I was able to use the inscope function to switch the signs of the Total numbers. But now I need to switch the signs of the Revenue column from negative to positive (and vice versa), without affecting the signs of the Cost column. It's strange to me because I CAN switch the signs for a specific row group (changing Customer1's number format, without affecting Customer2's format) using something like this:
 
=iif(Fields!Customer.Value = "Customer1", "($#,###.#0); $#,###.#0", "$#,###.#0; ($#,###.#0)")
 
But a similar expression specifying a column group value does not work, because the report seemingly doesn't recognize the value of the column group at all no matter what I do:
 
=iif(Fields!Type.Value = "Revenue", "($#,###.#0); $#,###.#0", "$#,###.#0; ($#,###.#0)")
 
The other reason why this is strange is that I've done drill-through reports off of matrix objects where specific column group values (the ones clicked on) can be passed into the drill-through report parameters. So it recognizes the column group values upon drill-through, but not for formatting?
 
How else can I do this? I must be missing something here. Thanks.

View Replies !
Need An Average By Year Of An Average By Month
I have a temp_max column and a temp_min column with data for every day for 60 years. I want the average temp for jan of yr1 through yr60, averaged...
I.E. the avg temp for Jan of yr1 is 20 and the avg temp for Jan of yr2 is 30, then the overall average is 25.
The complexity lies within calculating a daily average by month, THEN a yearly average by month, in one statement.
?confused?

Here's the original query.
accept platformId CHAR format a6 prompt 'Enter Platform Id (capital letters in ''): '

SELECT name, country_cd from weather_station where platformId=&&platformId;

SELECT to_char(datetime,'MM') as MO, max(temp_max) as max_T, round(avg((temp_max+temp_min)/2),2) as avg_T, min(temp_min) as min_temTp, count(unique(to_char(datetime, 'yyyy'))) as TOTAL_YEARS
FROM daily
WHERE platformId=&&platformId and platformId = platformId and platformId = platformId and datetime=datetime and datetime=datetime
GROUP BY to_char(datetime,'MM')
ORDER BY to_char(datetime,'MM');

with a result of:

NAME_________________CO
-------------------- --
OFFUTT AFB___________US

MO______MAX_T _____AVG_T__MIN_TEMTP_TOTAL_YEARS
-- ---------- ---------- ---------- -----------
01_________21______-5.31________-30__________60
02_________26______-2.19______-28.3__________61
03_______31.1_______3.61______-26.1__________60
04_______35.6______11.07______-12.2__________60
05_______37.2_______17.2_______-3.3__________60
06_______41.1______22.44__________5__________60
07_______43.3______24.92________7.2__________60
08_______40.6______23.71________5.6__________60
09_________40______18.84_______-2.2__________59
10_______34.4_______12.5_______-8.9__________59
11_________29_______4.13______-23.9__________60
12_________21______-2.52______-28.3__________60

View Replies !
Sorting Parameter Values In SSRS Model Based Report
Hi,
 
I have created a report using Report designer (Visual Studio,  using Data Model as a data source), in the report I had created few datasets (with single filed) to populate the report parameters, lets  say I have created a multi valued Parameter CustomerName and assigned field from a dataset,
 
result are coming correctly and combo box is getting populated but the customers are not in alphabetical order!
 
I want to sort it and need to specify it in report (please note that I am using Report Model as a data source and I can€™t sort the source table in the data base to get the result sorted)
 
 
Please let me know if anybody has done that or forward me if know some link which talks about it.
 
 
Thanks in advance.
 
Regards,
 
Jayant Jape
 

View Replies !
Adding Column After Matrix Total
<P>Greetings,</P>
<P>I am new to reporting services and am struggling with trying to add a column to the end of matrix report that has totals.&nbsp; You can see a jpg of the report at http://www.catertots.com/matrix.jpg What I need to do is repeat the school code that is in the first column into another column that follows the total.&nbsp; </P>
<P>Any help would be much appreciated.</P>

View Replies !
Adding Columns To A Matrix Report That Don't Belong To The Matrix Columns Groups
Can we do this?



Adding more columns in a matrix report that don€™t
belong to the columns drilldown dimensions€¦



That is, for example, having the following report:

                Product Family

               
Product    

Country  City   Number of units sold





Then I
would add some ratios, that is, Units Sold/Months (sold per month) and other that
is the average for Product Family (Units Sold/Number of  Product Family), for putting an example€¦ some
columns should be precalculated prior to the report so do not get into it, the
real problem I don€™t see how to solve is adding one or two columns for showing
these calculated column that doesn€™t depend on the column groups but they do
for the rows groups€¦




Any guidance
on that?


The only
way I am seeing by now is to set it as two different reports, and that is not
what my client wants€¦





 
Many
thanks,
Jose

View Replies !
Matrix And Column And Row Based Averages Without Using Avg()
 




 

A

A

A

A

B

B

Avg.


Name

1

2

3

4

1

2

 


xxxxxxxxxxx

12/16

90

100

85

10/8

100

--


xxxxxxxxxxx

20/16

 

 

93

5/8

100

--


xxxxxxxxxxx

16/16

 

89

90

16/8

95

--


Avg.

--

--

--

--

--

--

--
 
 

Greetings,

I have a matrix that looks similar to the table above with two row groups and one column group. Does anyone know a way to manually do column and row based averaging without using the avg() function -as the data is not numerical?
Thanks

View Replies !
Setting Parameter Value Based On Matrix Column
Hello all.

I am on the verge of being able to do exactly what I want, but just can't seem to find the right combination of things to do it.  I'm sure all of you wonderful folks will be able to point it out to me immediately, but I've been looking at it too long or something....


I have a record of individual sales with the state, and quarter of the sale.

sale_id   state   quarter
001         NY   2005Q1
003         WI   2006Q2
etc.


I create a report with a matrix to show count(sale_id) with Quarter as the column group and State as the row group.  This works fine.

Now what I want to do is to get percentages based on quarterly sales.  In other words, what percent of sales for 2005Q1 in NY vs. all sales in 2005Q1.  So I create a second dataset (called total) with an SQL query like so:

SELECT count(sale_id)
FROM data_table
WHERE quarter = @QueryQuarter

Now, back in the matrix I want to use the column that we're in (2005Q1, 2005Q2, etc.) as the value that is passed to this query.

This is a simple concept, but I can't seem to figure out the correct call to pass the column group to the query as the parameter.

Thank you for any pointers you might be able to give.  As I said, I'm right on the verge and just can't quite get it.

  cmk

View Replies !
Adding Grand Total To A Column Group In A Matrix. Please Help!
Hello Guys,
I am working on a matrix report which has several row groups and 1 column group. After execution, the column group wil end up with several columns containg numeric counts. I would like to have the grand total for each "column group" column as a last row on this report. 
For row groups you can just right click "Subtotal", but that is not possible for column group. Could someone please help me to find a clever way of accomplishing this, please. Thank you so much for your help!  

View Replies !
Adding A Y/N Column Based On Criteria
Currently I'm trying to add a column based on certain criteria based on the following data:

CallID GroupName CustomerPending
------ ----------- ------------
00500588FollowupN
00500588FollowupN
00500588Server N
00500588Service DeskN
00500588Service DeskN

Basically I'm trying to add an extra column, so that whenever the GroupName is "Followup", then a 'Y' will appear in the CustomerPending column for all instances of that CallID. I tried with the following, but it only provides a 'Y' in the rows (not the CallId's) where "Followup" is found.

--------------------------------------
UPDATE dbo.Asgnmnt
SET CustomerPending = 'Y'
FROM dbo.Asgnmnt
WHERE dbo.Asgnmnt.GroupName IN ('SD Followup')

ALTER Table Asgnmnt
ALTER column CustomerPending varchar(1)

UPDATE dbo.Asgnmnt
SET CustomerPending = 'N'
FROM dbo.Asgnmnt
WHERE dbo.Asgnmnt.GroupName NOT IN ('SD Followup')

ALTER Table Asgnmnt
ALTER column CustomerPending varchar(1)
---------------------------------------

Any assistance appreciated.

View Replies !
Highlight The Entire Column In A Matrix Based On The Parameter
I am working on an issue.  I have a matrix and it displays more data than the user actually needs so the user can see the big picture.  I want to highlight the entire column based on the row heading and the parameter input.

 

So for example I have a matrix like this:

 State/Hour 8AM, 9AM, 10AM

AZ                3          7         8

OH               12       6         1

MI                5            4       3

 

The input parameter value is 9AM so the entire column of 9AM needs to be highlighted in yellow. 

 

I'm not sure if InScope applies and how to get the column heading to be the value - not the individual value itself.  I know how to highlight based on the individual value in the matrix.

 

Any help would be appreciated.

View Replies !
Adding A Textbox For Rowcount In Matrix And Tabular Report
I need to add a textbox in the report which would display the total number of rows in the report.I need to do this in reports which have either tabular layout or a matrix layout .
Thanks in advance

View Replies !
Adding An Identity-based Integer Column
I need to add a column that has the datatype of integer with a seed and identity increment to a table that already exists and has data in it - and can't all NULLs. I have heard that this not possible if the table already exists.

I have downloaded the demo's of SQL Programmer and a couple of Embarcadero programs to see if that would help, but have had no succes to date.

Thanks for any help,

Alan

View Replies !
Adding A Category Column Based On A Calculation
Hi all,
 
I have a large dataset (currently 131,000 rows) that looks similar to the following:
 
ID             NewPer     NewAmt     OldPer       OldAmt
334           1/07/08       200           22/01/08    200
2396         1/07/08       4000         10/12/07    3600
7650         1/07/08       1100         07/07/06    1200
.
.
.
 
and I need to create a session temp table (eg ##output) that translates the calculation (NewAmt - OldAmt) into categories such as
 
"decrease -201 to -500"
"decrease -1 to -200"
"no change"
"increase 1 to 200"
"increase 201 to 500"
 
so that my final output would look like this:
 
ID             NewPer     NewAmt     OldPer       OldAmt     Change     ChangeCategory
334           1/07/08       200           22/01/08    200           0              no change
2396         1/07/08       4000         10/12/07    3600          400          increase 201 to 500
7650         1/07/08       1100         07/07/06    1200          -100         decrease -1 to -200
.
.
.
I understand how to add the "Change" column to my temp output table, but am struggling with the ChangeCategory column - can someone point me in the right direction?
 
Thanks in advance
Jamie

View Replies !
Adding A Column Name To A Table In Each Of The Databases Based On A Condition
i have the folowing databases DB1,DB2,DB3,D4,DB5........

i have to loop through each of the databases and find out if the database has a table with the name 'Documents'( like 'tbdocuments' or 'tbemplyeedocuments' and so on......)

If the tablename having the word 'Documents' is found in that database i have to add a column named 'IsValid varchar(100)' against that table in  that database and there can be more than 1 'Documents' table in a database.
 

can someone show me the script to do it?
 

Thanks.
 

View Replies !
Setting Page Break In Matrix Report Based On RowNumer
Hi,
 
     Do some one has idea how we can create pagebreak in matrix based on RowNumber.Say I have 40 rows in matrix(I don't have group on which I can create a group by setting PAGE BREAK AT THE END)
 
     =ROWNUMBER(NOTHING)  MOD 10 = 0 ,TRUE,FALSE
 
I don't have any distinct value on which I can create Group like
 
= IIF(Parameters!PageBreak.Value,Fields!CategoryID.Value,1) and setting Page Break At The End
 
 
-Thanks,
Digs
 
 

View Replies !
Conditional Formating In Reporting Services 2005
Hello,
I have a problem formating a line in a diagram in SSRS 2005. I want to change the color of the line depending on a value on the x-axis.


I always get an exception that the bordercolor expression for the diagram Object 'Bestandsentwicklung.DataPoint' contains an error. The entry string has the wrong format.

 

The function is the following:
=IIF(Parameters!CurrentWeek.Value.ToString > cdbl(Fields!DimZeit_WocheTag_Woche_MEMBER_KEY.Value.ToString),"Firebrick","Blue")
whereby the parameter currentweek should return a number and the field DimZeit_WocheTag_Woche_MEMBER_KEY, too.

 

Can anyone help me? How do I have to convert the values to solve the problem?


Stefoon

View Replies !
Add Subtotal And Row Counter To A Report Column In A Matrix Report
Hi,
I have a matrix report with 3 columns and each column shows a subtotal. There a way to to display a number of rows in the subtotal row along with the subtotal value?

Thanks,
Igor

View Replies !
Add Subtotal And Row Counter To A Report Column In A Matrix Report
Hi,
I have a matrix report with 3 columns and each column shows a subtotal. There a way to to display a number of rows in the subtotal row along with the subtotal value?

Thanks,
Igor

View Replies !
Add Subtotal And Row Counter To A Report Column In A Matrix Report
Hi,
I have a matrix report with 3 columns and each column shows a subtotal. There a way to to display a number of rows in the subtotal row along with the subtotal value?

Thanks,
Igor

View Replies !
3 Month To Date Average
Hello Friends

Actually i posted this problem earlier , hoping that i got the result , did not look in depth untill i realized the values i got was getting was wrong.

The Scenario is still the same.

3 MTD should be the past two completed months as well as the dates in the current month as well. So taking the example above – if the reporting period for Feb was 01/30/2007 to 02/27/2007, and March was 02/28/2007 to 03/27/2007, the 3 MTD should then be the average from 01/30/2007 to 04/10/2007.

I am creating a Calculated Member as measure.

Basically if i select the average on 76th day of the year, it should basically be the average of 76th Day ( well offcourse whould ignore the empty cells )

For Example the result set should be very similar , It is basically doing MTD

Running balance is basically adding up , where as 3 month to date average should be average of 3 month previous average

suppose today is 75th day , so it should be average of 30days(1st Month ) + 31days(2nd month)+ 14days(of this month)

I have used the lag function

AVG(Hirearchy.Currentmember.lag(2):Hirearchy.Curre ntmember, Measure.abc)

where hirerachy is Year->Month-date

The problem i have here is which i am coming close to conclusion

When i use month level it gives me average of month level , the result on month level is fine. But my requirment is to have it on date level. but how do i have rolling average of 3 month in a date level, if i do a date level with 90 days lag which is not correct which is average of 90 days from current day.

AVG([Tbl Date Key].[Report Hirerachy].CurrentMember.Lag(2):[Tbl Date Key].[Report Hirerachy].CurrentMember,[Measures].[Ab1_Avg]

)


When i drill down to date level , which would be assumed

AVG([Tbl Date Key].[Report Hirerachy].date.Lag(2):[Tbl Date Key].[Report Hirerachy].date,[Measures].[Ab1_Avg]

)





its doing a lag on 3 days lag as appose to , I need the lag on 3 months on a day which would be 90 days

should i be doing a lag on days.



The problem at 90 days lag would be every it would lag 90 days average , but what i am looking for it is when it is on the middle of the month it should be

suppose today is 15th day of month, so it should be average of 30days(1st Month ) + 31days(2nd month)+ 14days(of this month)


i am confused , please help

View Replies !
3 Month To Date Average
Hello Friends

Actually i posted this problem earlier , hoping that i got the result , did not look in depth untill i realized the values i got was getting was wrong.

The Scenario is still the same.

3 MTD should be the past two completed months as well as the dates in the current month as well. So taking the example above – if the reporting period for Feb was 01/30/2007 to 02/27/2007, and March was 02/28/2007 to 03/27/2007, the 3 MTD should then be the average from 01/30/2007 to 04/10/2007.

I am creating a Calculated Member as measure.

Basically if i select the average on 76th day of the year, it should basically be the average of 76th Day ( well offcourse whould ignore the empty cells )

For Example the result set should be very similar , It is basically doing MTD

Running balance is basically adding up , where as 3 month to date average should be average of 3 month previous average

suppose today is 75th day , so it should be average of 30days(1st Month ) + 31days(2nd month)+ 14days(of this month)

I have used the lag function

AVG(Hirearchy.Currentmember.lag(2):Hirearchy.Currentmember, Measure.abc)

where hirerachy is Year->Month-date

The problem i have here is which i am coming close to conclusion

When i use month level it gives me average of month level , the result on month level is fine. But my requirment is to have it on date level. but how do i have rolling average of 3 month in a date level, if i do a date level with 90 days lag which is not correct which is average of 90 days from current day.

AVG([Tbl Date Key].[Report Hirerachy].CurrentMember.Lag(2):[Tbl Date Key].[Report Hirerachy].CurrentMember,[Measures].[Ab1_Avg]

)


When i drill down to date level , which would be assumed

AVG([Tbl Date Key].[Report Hirerachy].date.Lag(2):[Tbl Date Key].[Report Hirerachy].date,[Measures].[Ab1_Avg]

)





its doing a lag on 3 days lag as appose to , I need the lag on 3 months on a day which would be 90 days

should i be doing a lag on days.



The problem at 90 days lag would be every it would lag 90 days average , but what i am looking for it is when it is on the middle of the month it should be

suppose today is 15th day of month, so it should be average of 30days(1st Month ) + 31days(2nd month)+ 14days(of this month)


i am confused , please help

View Replies !
Get Count And Average Number Of Records Per Month
Example table structure:
Id int, PK
Name varchar
AddDate smalldatetime

Sample data:
Id Name  AddDate
1  John  01/15/2005
2  Jane  01/18/2005
.
.
.
101  Jack  01/10/2006
102  Mary  02/20/2006

First, I need to find the month which has the most records, I finally produced the correct results using this query but I am not convinced it's the most efficient way, can anyone offer a comment or advice here?

select top 1 count(id), datename(mm, AddDate) mth, datepart(yy, AddDate) yr
  from dbo.sampletable
  group by datename(mm, AddDate), datepart(yy, AddDate)
  order by count(id) desc

Also, I'm really having trouble trying to get the overall average of records per month. Can anyone suggest a query which will produce only one number as output?

View Replies !
Average In Matrix
 

Just want to gathr some ideas.I have a matrix where i retrieve Fields!Amount.I used the subtotal property to get the total amount per quarter.But how can i get the average of the 3 months.I tried using the Avg(Fields!Amount.Value) but it's results is unexpected or wrong.
                  ________________________
                 | Avg(Fields!Amount.value)    |
                 | Jan   |    Feb    |    March    |
                 -------------------------------------------
                 |  0.1  |    0.2     |    0.2         |
                 |  0.3  |    0.1     |    0.5         |
SubTotal   |  0.4  |    0.3     |    0.7         |
 
That is the design of my matrix.And other thing,it is dynamic,for example,There is a possibility that Feb could be absent.SO i cannot make Sum(Fields!Amount.Value) / 3. Dont know what to do for that.Why could Avg be wrong, correct me if im wrong,but as for what i know,i think the formula for Avg in my matrix is :
 
Avg = Sum of 3 totals / no. of months..
 
Hope to hear from anyone out there..Thanks!! 

View Replies !
Static Column In A Matrix Report
Hi All

I have a matrigx report that groups by months in the columns. The reason for using a matrix style report is due to not knowing which months are going to exist in the database for the current year.
I do however need to have a static column appended to the matrix, using the same row groupings... I did think of placing a table next to the matrix with that column although im worried the row groupings and alignment may be off of each record.

Is it possible to have a static column inside a matrix that is not grouped by any of the columns just the rows.

What would be the best way to achieve this requirement. I also need to provide the options to hide the months columns and display only the static one and vice-versa...

Any help would be appreciated..

Regards,
Neil

View Replies !
Matrix Report - Extra Column,.
Hi All,
 
I have created a matrix report contains two column: TotalA and TotalB. I'd like to create a new column that is the different between those two column.
Expected result:
            Total A  Total B Different
Apple    500       300      200
Mango  1000      500      500
 
My feeling is this has to be done via custom code.
 
Any hints or advises please?
 
Thanks and Regards,
XL

View Replies !
Column Head On A Matrix Report.
Hi
I have a huge matrix with 8 columns and then all the data that's generated when choosing a date span. These 8 columns are Topic, Salesperson, Company and so on and then the right part of the matrix grows with values for each month.
 
My problem is that there are no column headers for the first 8 columns!! How come?
What I did to resolve this was to put in a table in the top left cell and then write in the corresponding column header. This works €¦ in IE but not in PDF or Excel. And I really need it when I export it to Excel.
 
Any ideas?
 
Kind regards.

View Replies !
Column Header For Matrix Report
I have a matrix report, which looks like the following:

                                  Header C     Header D  

Column A Column B   Column C     Column D

 

Column A and B are Row Group columns in the matrix. Column C and D are the details columns. How can I add column header to column A and B. Seems I cannot do it in Reporting Services 2005.

 

Fan

 

View Replies !
How To Add Coustom Column In Matrix Report
Hi,
 

Can someone tell me,How to create a cusotm column in Matrix report
I have Row Group as State and Column group as Status
I need to have one additional column in Matrix named Resolved Count which basically shows conunts for State which got resolved
 
State                                    Status1                       Status2                                 Resolved Counts[Custom Col]
 
NY                                        12                              13                                        1
 
TX                                          1                                5                                         3
 
 
 
I tried creating a different column group but seems like it's not working.I read somewhere that you can do it.Do someone has idea how to achieve it?
 
 
-Thanks,
Digant
 
 
 
 
 

View Replies !
Matrix Report And Its Column Aggregates
hello everyone,
 
I hope some one can give me pointers to an efficient solution.
 

We have a matrix report that looks something like this
_______________________
|         | Column Header      |
----------------------------------------
|         | Sub Col1 |Sub Col2|
----------------------------------------
| Date |   Value      Value    |

-----------------------------------------
 
We have to evaluate a number of additional attributes - like mean, std Deviation,max value, min value, etc for each of the columns (the total sub columns can vary between 1 and 9).
 
this additional info has to be shown in a seperate table/matrix -
 
|Statistics    |Sub Col1|Sub Col2|
------------------------------------------------
|Mean          | 1.5         | 2.5       |
------------------------------------------------
|S.Deviation  | 0.5         | 1.5       |
------------------------------------------------
|Max Value  | 3.5         | 4.5       |
------------------------------------------------
i know that aggregate functions are available to get this info, i am just not sure how i can show this in the second matrix.
 
Any help will be great.
 
Regards,
Sid

View Replies !
Matrix Report Total Column
Hi Everyone,
 
I am designing a report in SQL Server 2005 Report Designer that uses a Matrix table.  The matrix table is grouped by month.  How can I add a Year-To-Date total column on the report?  This is driving me nuts...I cannot figure this out.
 
Thank You
-Sam

View Replies !
Subtotal Average Matrix
 

hello,
my problem is in a report with matrix,  i use aggregate funtion, but all the cells appears Empty , if i not use aggregate the cells appears well , but the subtotals is bad.
 
= aggregate( field!myaverage.value)         (myavergae is measure mdx)
 










YearCOLUMGROUP



average measure

MonthCOLUMGROUP



 
 
2007
 
TOTAL

PGROWGROUP
PSGROWGROUP
JANUARY
FEBREUARY


P1
SP1
12
2


P2
SP2
2
4


P3
SP3
1
5


P4
SP4
2
4


TOTAL





 
how can i use aggregate by the subtotales and without the aggregate by the rest?

View Replies !
DISPLAY COLUMN GRANDTOTALS IN A MATRIX REPORT
Hi there...

I have a matrix report within a list so it functions as a report with dynamic columns.

Matrix a:

          a   b   c   d   e

x        1   2   4   9   12  <NEED SUBTOTAL across Columns for row x>

y        6   2   4   5    9   <<NEED SUBTOTAL across Columns for row y>

TOTAL <need totals going down rows and need a grand total>

 

Remember the number of rows and columns are dynamic so I have NO CLUE how to add a column and display it if and only all the columns have been displayed ...sort of like a COLUMN and ROW footer for a matrix report.

 

Any help will be appreciated

thank you

Prashanth Prasanna

View Replies !
Column Footer Needed On A Matrix Report
Hi

Problem:

I have a matrix report with horizontal tables enabled (dynamic columns) following an example by Chris Hay's website

http://blogs.msdn.com/chrishays/archive/2004/07/23/HorizontalTables.aspx

Now ...that I have it working, I need a column footer at the end of the columns (on the same row) to total all the numbers from say column 4-column 10 (column1-column3 are information/string cells)

How do I get this functionality to work ?

Any help would be appreciated

 

Partial Solution:

I have looked at creating a text box at the end of the matrix in the LAYOUT tab, but I cannot seem to figure a way to total the numbers going across the row ?.

Is that even possible ?

Col Num: Col1--Col2--Col3--Col4--Col5.......Col10--GrandTotal of Row

Col Value:aaa---bbb---ccc---1000--200.........500  ....Sum(c3,c4....c10) < What is the syntax for summing this way ??>

 

 

THANKS FOLKS!

 

View Replies !
Column Header Duplicated -- Matrix Report
I've a matrix report with two row groups. One of the row groups has been used to do alternate coloring in report rows. The issue is that the header text that I've provided for the row group repeats twice. Another interesting point to note here would be this doesn't happen in the report preview but only when the report is displayed through a report viewer in an ASP.Net application. I can guess that it must have got something to do with the invisible row group but can't get my head around on how to avoid it?
 
The report currently looks something like below:
 
  Month                 2007                                  2008

  Month           Total    Ave    %            Total     Ave      %
-----------------------------------------------------------------------
January          12         6       1.5......................etc etc.
 
I want the text "Month" to come only once. Thanks.

View Replies !
Grand Total Column In Matrix Report
Hi,
Hi All,

I am having some trouble getting a Grand Total column at the end of my matrix report (not row at the bottom), such as you get by default in an Excel pivot table.

I have managed so far to add another column that sums up all values across the data range for a particular product code.  My intention was to hide all but the last (I did something similar on rows).  However you cannot use an expression on the width property for columns, so this will not work.

My report is very standard:
                                                  Year
                                                  Month (grouped by year)
Product code | Description            [qty]

 
I want a column that displays the total qty across all dates for each row.  Surely this is possible?

Any suggestions would be appreciated!  Thanks.

View Replies !
Hiding Column Group Based On Row Group In Matrix...
I have a matrix that has a row group with page break after each and a column group.  I want to show only certain columns when row group is equal to (something).  Is this possible?

 

View Replies !
How To Do SUM Of Average In Subtotal Cell For The Entire Matrix
Hi,

 

I have a matrix as shown below:

 








Head Count


Jan-07
Feb-07
Average

Dept1
59.00
62.00
60.50

Dept2
21.00
21.00
21.00

Total
80.00
83.00
81.50

 

I am having trouble figuring out how to ADD the "Average" column to get the 81.50 (red). I tried SUM(AVG(Fields!....)) but it didn't work.

 

Any help is appreacited!

 

 

Thanks,

Tabbey

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved