Two matrix report
i've a report and it was divided into two groups and this is in matrix format.
the 1st group is ok but i'm having problem with the 2nd group wherein the data
does not pan to the right..
if someone could help me..i can send the rtf and my xml file..
closing this thread i got the solution
Similar Messages
-
Calculate percentage between two rows in a matrix report with a single row group in SSRS 2008
I need your help. I have a matrix report in ssrs 2008. The report contain one field value column and one value column. I need to calculate a percentage for two values. For example : row 1 : Discount 10 Row 2 : Sales 100 Result : 10/100. I have only one
row group, I need to have a condition where Field = Discount % on Revenue then Discount/Total Turnover. Because of the grouping for total, I am not being able to calculate the %, its just totalling the % discount. Kindly refer to the snapshot of the
report.Hi Thanks a lot for your answer, but unfortunately it didn't work,the report is reading from a stored procedure which I have unpivot to convert all columns into rows, so that's why Discount % on Revenue, Discount and Total Turnover is found in one column.
So the Field!Col.Value is the Discount % on Revenue, Discount and Total Turnover. I have tried to change the code to
"=SUM(IIF(Fields!Col.Value = "Discount",Fields!value.Value),0))
/IIF(SUM(IIF(Fields!Col.Value = "Turnover Total",Fields!value.Value),0)) = 0 ,
Nothing,SUM(IIF(Fields!Col.Value = "Turnover Total",Fields!value.Value),0)))" but to no avail. Any other suggestion will be most welcome.
Thanks.
If everything you're getting from stored procedure then you need to calculate and bring the value from there itself.
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
Matrix report with two across groups
Hi all,
I am facing a problem in making a multi line matrix report.
actually I need to make a matrix report with two "across groups", but unable to get desired result.
if any body has any idea, please share with me.
regards
AtaNo,
you must have only 1 query which extracts all your data:
A,q1,10
A,q2,20
A,q3,30
B,q1,40
B,q3,50
C,q2,60
C,q3,70
Open report builder and create a new report from wizard.
Select the first option accordingly with your requirements and go next.
Type a name for your report in the title field then select "Matrix" as layout and go next.
Select SQL Query and go next.
Type your query.
Select the data you want on the rows (i.e. A, B, C...) and click on the ">" button in the Matrix Row Fields section, then go next.
Select the data you want on the columns (i.e. q1, q2, q3...) and click on the ">" button in the Matrix Column Fields section, then go next.
Select the data you want on the cells(i.e. 10,20,30...) and click on the "Sum >" button in the Matrix Cell Fields section, then go next.
Add some totals, if you need them.
Go next and finish.
Now you have a report with the following layout:
Q1 Q2 Q3 TOT
A 10 20 30 60
B 40 50 90
C 60 70 130
TOT 50 80 150 280Bye
Raffy -
How to calculate percentage and difference of two values in matrix report in ssrs 2008
Hi everyone,
DB--SQL server
SSRS-2008
I am creating matrix report with grouping on WEEK and Fiscalyearweek,
I need to calculate of difference between FY14W01,FY15W01 ande percentage of those..
how to calculate in ssrs level.
Thank You, Manasa.VHi veerapaneni,
According to your description, you want to calculated the increment percentage and difference between two fiscal year week within each week. Right?
In this scenario, since we need to do calculation based on values between dynamically generated cells, we can't simply use expression to achieve this goal. In this scenario, we need to use custom code to record the value for fiscal 14 and fiscal 15, then
we can calculate the difference and percentage within the column group. We have tested your case in our local environment, please refer to the steps and screenshots below:
1. Add the custom code below into the report (you may need to modify the data type based on your scenario:
Public Shared Value1 as Integer
Public Shared Value2 as Integer
Public Shared previous as string
Public Shared previousweek as string
Public Shared Function GetValue(Value as Integer,product as String,Week as String) as Integer
If product =previous and Week =previousweek Then
Value2=Value
Else
previous=product
previousweek=Week
Value1=Value
End If
return Value
End Function
Public Shared Function GetPct()
return (Value2-Value1)/Value1
End Function
Public Shared Function GetDiff()
return Value2-Value1
End Function
2. Design the matrix like below:
3. The result look like below:
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Oracle matrix report split in two pages
hi,
my matrix report is spliting in two pages. All columns are ok but the total of the columns shows *** due to length problem so i increase the columns width and the report goes in two pages now.
Is there any way to show the totals in without decresing the width eg..
123456789111
can be shows like
1234567
89111
i already using smallest fonts
thankshelloooooooooooooooooo
-
Please help. I have a matrix report. In the report I have row group PO Type. One the Column groups I have a parent group by Fiscal Year, and then a child group by Month. When I run the report, I get two years of data back broken
out by month. Please see below.
Now here is where I am getting stuck. I need to take the variance between the current month of the current year, from the same month of the prior year. So I need to show the difference between Oct , 2014 from Oct, 2013. November, 2014 from November
2013... etc. etc.
In the example below, how do I create a column or row showing the variance for Contracts for October 2014. I need to take the contracts for October 2014 which is 3 and subtract that from October 2013 which is 8. Any suggestions? How do I do that
for each month? Then I need to do it for the quarter... then the year? But I'll be happy if I can just get the month working first.
Any help will be appreciated.
here is what my rdl file looks like.
Here is what my report looks like when I render it.Hi Adrian_s2012,
According to your description, you want to compare values for the month of current year with the month of prior year and get the variance. Right?
In Reporting Services, we don't have any function to get this "Year to Year" Growth. In this scenario, if you data source is a cube, we suggest you use Analysis Services to achieve your requirement. If this data source is just from database, it will be hardly
to calculate the variance because we need to compare the values within every two different column group and matrix generate adjacent columns one by one. Even we make it by using custom, every time executing the long code when generating result
in a cell will reduce a lot of performance, we really don't suggest to do that in SSRS. Here is a thread with much easier requirement, please take a reference of that:
http://social.msdn.microsoft.com/Forums/office/en-US/842e2dcb-d949-4297-9d91-eac989692cb5/difference-between-the-grouped-column?forum=sqlreportingservices
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Line Chart/Graph for a Matrix report in Oracle Reports 10g
Hello,
If you have a Matrix report, say Month Name as rows, Year as columns (for example 2007, 2008, 2009) and sum of Sales dollar value as cells...I want a Line Graph which shows Months on the bottom axis and Years represented by lines and the sales value as the trend or data points on the horizontal line...it seems Oracle Reports cannot do this sincethe Chart wizard does not show either the Months or years as selectable fields for either X or Y axis.
I can easily write a sql which does the pivot and produce the results for Sales by month for last 3 yrs but in this case I would have to provide column alias similar to say CURRENT_YEAR, PRIOR_YEAR, PRIOR_PRIOR_YEAR. Then, the Chart wizard works correctly but the Legend shows the column alias which is not very desirable for an executive level report.
I was hoping that since a matrix report shows the correct column names, the legends will pull through correctly but I am stuck since the Chart for a matrix report doesn't work as I described above.
Does anyone know how to do this type of Chart on a Matrix?
Thanks,
Manish
Edited by: mhathi on Jul 15, 2009 1:59 PMThe way I'd do it is with a 3D-graph, I think you need that otherwise you will not be able to represent it properly ...
You will need to create another query just for the graph, which will create another group, containing only 3 columns (YEAR, MONTH, SALES), then start your Graph Wizard, then you will see two groups, select the one containing the 3 columns and when asked for the X-axis categories select both YEAR and MONTH, then for Y-axis select SALES.
That way it should work... -
: HIDING SUMMARY COLUMNS IN MATRIX REPORT , URGENT
Hi,
Can any one please tell me how to hide a column in oralce matrix report. Its a summary column for the matrix report which appears next to the cell values. For example
Manufacturer
Brand
SubBrand1 SubBrand2 Brand Total Manufacturer Total
Week $ Sales $ Sales Total $ Sales Total $ Sales
This is a case where,the cell value is the $ sales for the SubBrand for the week. And it gets total at each brand level and each Manufacturer level. The requrement is if there is only one SubBrand for a Brand then the Brand total should not appear on the report. Similarly if there is one Brand for a Manufacturer, then the total at Manufacturer level should not appear . The point is not only it should dissapear but the frame should srink to make it fell that there is no totaling going on at those two levels. If the fileds just remains blank then the report looks odd. So the gap should be srinked as well. How to do it . This is very urgent . Please help me out.
Thanks
Ferozuse a formst trigeer on the field that returns false when you don't want to display the field.
-
How to create a matrix report on Apex 4.1
Hi all.
I need to create a report similar to this one:
Jan Feb Mar .....
Product Category
Category One 999 999 999
Category Two 999 999 999
On a reporting tool like Oracle Reports, this is call a matrix report which can be easily created: just one simple query , select a matrix report type, compute summary values for row /column and grand total, and that is.
How would one implement this on Apex 4.1???
Have a couple of ideas:
- Populate temporary table with columns corresponding to month.
- Create a procedure that return a collection and use that as a source for report.
- Etc.
What other options do i have ...?
Thanks in advance ...!Hi all,
I did create a matrix report using the pivot function and some interesting settings in APEX. So far it is only does display data. I did not find a way yet(?) to alter the data in the same matrix.
The data is based on a simple set of tables about planning. The end result does look something like the matrix below. Note: the dashes are just there to make the matrix look like a matrix on this forum.
Resource 13-08 20-08 27-08 03-09 10-09 17-09 24-09
Angelo-----25-----22-----12-----10------------------------
John---------8-----22-----36-----22------------------------
Marit-----------------5-----40-----36-----24-----12-----10
The resources (Angelo, John and Marit) are being registered in the following table:
CREATE TABLE EVP_RESOURCES
RSS_ID NUMBER(10,0) NOT NULL,
NAME VARCHAR2(25 BYTE) NOT NULL
The date periods (13-08 till 24-09) are being registered in the next table:
CREATE TABLE EVP_DATA_POINTS
DPT_ID NUMBER(10,0) NOT NULL,
DATA_POINT_DATE DATE NOT NULL,
V_DATA_POINT_DATE_FORMATED VARCHAR2(75 BYTE) GENERATED ALWAYS AS (TO_CHAR("DATA_POINT_DATE",'dd-mm')) VIRTUAL VISIBLE
The virtual column (v_data_point_date_formated) is not needed. You can use this virtual column or format the column in multiple places.
The available units are being registered in the intersection table below:
CREATE TABLE EVP_RESOURCE_PLANNING
RPG_ID NUMBER(10,0) NOT NULL,
DPT_ID NUMBER(10,0) NOT NULL,
RSS_ID NUMBER(10,0) NOT NULL,
UNITS NUMBER(10,0)
The data is being displayed in APEX in a report region of type "SQL Query (PL/SQL function body returning SQL query)". And the following option has to be switched on "Use Generic Column Names (parse query at runtime only)".
This does give a restriction on the number of columns which can be used. You can however change the number of columns in the field "Maximum number of generic report columns:" to a high number. So in most cases this is no issue at all.
In the Region Source I did put the following code:
begin
return 'select *
from ( select rss.name "Resource"
, v_data_point_date_formated
, rpg.units
from evp_resources rss
, evp_data_points dpt
, evp_resource_planning rpg
where rpg.dpt_id = dpt.dpt_id
and rpg.rss_id = rss.rss_id
pivot (sum(units) for v_data_point_date_formated in (' ||
evp_pkg_dpm.f_dynamic_pivot_in ||
order by 1';
end;
The function evp_pkg_dpm.f_dynamic_pivot_in does return a string which is based on the number of rows in the table evp_data_points. In my case this string is: '13-08' as "13-08",'20-08' as "20-08",'27-08' as "27-08",'03-09' as "03-09",'10-09' as "10-09",'17-09' as "17-09",'24-09' as "24-09". If you ommit the 'as "..."' you do get quotes in your headings.
Enjoy and regards,
Jurgen
PS: let me know if something is missing or not clear!
Edited by: user553427 on Aug 17, 2012 5:46 AM (Query has been made more simple and I build up the header differently) -
How to calculate difference and percentage in matrix report dynamic columns in SSRS 2008
Hi Friends,
I need to calculate Difference and Percentage In matrix report SSRS 2008
1) Row grouping based On Product
2) Column Grouping Week and Fiscal Year Current week and Previous Year same Weeks
3)Data Invnetory(Value fileld)
Example:
If value1 and Value2 Available we need to calculate Percentage and Difference.Otherwise Not required NA I need to Show.
For example If Particular week,Current year data is available,Previous year week data is not available No
need to cal Diff and Percentage we need to show Empty.
Below Code is working for If two values is available.
If any one of the fiscal year week data is not there it's taking some garbage values.
I tries with If condition in GetPCT() and GetDiff() It's not working.
Can some one please help me on this.
I am using the custom code
Public Shared Value1 as String
Public Shared Value2 as String
Public Shared previous as string
Public Shared previousweek as string
Public Shared Function GetValue(Value as String,partner as String,Week as String) as String
If partner =previous and Week =previousweek Then
Value2=Value
Else
previous=partner
previousweek=Week
Value1=Value
End If
return Value
End Function
Public Shared Function GetDiff()
return Value2-Value1
End Function
Public Shared Function GetPct()
return (Value2-Value1)/Value1
End Function
How to handle this.
Thank You, Manasa.VHi veerapaneni,
According to your description, if one of the fiscal year week doesn’t have data, the custom code returns false results.
For your requirement, if NULL value exists in the database, we should replace it as zero then perform calculate. So within the code, we should judge whether the value is NULL. To achieve your goal, please refer to the steps below:
1. Create a table like below.
create table dif4
([Product Group] varchar(50),
[Week] varchar(50),
[Fiscalyearweek] varchar(50),
value int
insert into dif4 values
('Desktops','W01','FY14W01',0),
('Desktops','W01','FY15W01',45),
('Desktops','W02','FY14W02',null),
('Desktops','W02','FY15W02',30),
('Desktops','W03','FY14W03',12),
('Desktops','W03','FY15W03',50),
('Notebooks','W01','FY14W01',35),
('Notebooks','W01','FY15W01',56),
('Notebooks','W02','FY14W02',45),
('Notebooks','W02','FY15W02',87),
('Notebooks','W03','FY14W03',75),
('Notebooks','W03','FY15W03',105),
('Tablets','W01','FY14W01',34),
('Tablets','W01','FY15W01',46),
('Tablets','W02','FY14W02',49),
('Tablets','W02','FY15W02',96),
('Tablets','W03','FY14W03',42),
('Tablets','W03','FY15W03',113)
2. Add the custom code in the Report Properties.
Public Shared Value1 as Integer
Public Shared Value2 as Integer
Public Shared previous as string
Public Shared previousweek as string
Public Shared Function GetValue(Value as Integer,product as String,Week as String) as Integer
If Value=Nothing Then
Value=0
End If
If product =previous and Week =previousweek Then
Value2=Value
Else
previous=product
previousweek=Week
Value1=Value
End If
return Value
End Function
Public Shared Function GetPct()
If Value1=0 Then
return 0
Else
return (Value2-Value1)/Value1
End If
End Function
Public Shared Function GetDiff()
return Value2-Value1
End Function
3. Design the matrix like below.
4. Then get the expected results.<o:p></o:p>
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
Please see below matrix report before and after I run. How can I find percentage of below marked fields,
for example: 1/3=0.33 (%33) Female(PAs)/Total(PAs)=?
Erdal HuzmeliHi Erdal,
According to your description, you have a matrix report and you want to get percentage of two different column in this report. Right?
In Reporting Service, we can’t just use ReportItem function or aggregation function with scope string to calculation when we are working in a matrix because the columns of matrix are dynamic. So we need to define some functions in custom code and do calculation
by calling those functions. Your scenario has been tested in our local environment. Here are some steps and screenshots for your reference:
Add the custom code below into your report:
Dim Shared Num1 As Integer
Dim shared Num2 As Integer
Public Function GetPA(PA as Integer, Type as String)
If Type = "Male" Then
Num1=PA
ELSE If Type="Female" Then
Num2=PA
End If
Return PA
End Function
Public Function GetMalePct()
Return Num1/(Num1+Num2)
End Function
Public Function GetFemalePct()
Return Num2/(Num1+Num2)
End Function
Ps: We notice that Total PA=Male PA +Female PA. So we use “Num1+Num2” in the functions that we define in the custom code instead of using “SUM(Fields!PA.Value)” in expression.
Put the expression below into the PA textbox in Gender group:
=Code.getPA(SUM(Fields!PA.Value),Fields!Gender.Value)
Put the expression below Female textbox within Gender Percentage:
=Code.getFemalePct()
Put the expression below Male textbox within Gender Percentage:
=Code.getMalePct()
Save and preview, the matrix and result looks like below:
Reference:
Custom Code and Assembly References in Expressions in Report Designer (SSRS)
How to calculate the Percent change in a dynamic
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Master/Master Matrix Report
May I know is it possible to create a Master/Master matrix report? The example given in the Reports Documentation shows Master/Master Tabular reports only and I have been attempting to create a Matrix one but without success. Thank You.
Cheers,
TanI have never come across a two query M:M matrix report. Just out of curiosity, what is your requirement that would make that necessary?
Metalink provides a couple of different ways to do matrix reports (including the 1 query and 3 query methods) but I haven't seen anything to the effect of what you are describing.
Regards,
Steve -
Need help with Drill down Matrix Report
Hi,
I need to create a matrix report with a tree functionality with two line heading.
Can some body tell me how can I generate this report?
REGION1 REGION2 REGION3
COL1 COL2 TOTAL COL1 COL2 TOTAL COL1 COL2 TOTAL
===========================================================
CAT1+
Sub_CAT1
Sub_CAT2
CAT2+
Sub_SCAT3
Sub_SCAT4
Where CAT1 , CAT2 needs to be collapsible rows. SCAT1..SCAT4 are sub categories under main categories.
REGION1.... REGION3 are top level headings. And COL1,COL2 are sub headings under top level headings.
Thanks,
ShrikantAs I said when I believe you posted up a similar question under a different user name...., (yes, it's that easy to tell )
Asking questions here about a version of Logic that was apparently, not legally purchased using the Mac App Store.. is not wise.... no matter what your reasoning for not being able to afford it...
Buy LPX, install it properly and then see if you have the same issues..... -
Need Help : Matrix Report
Hi Everyone,
I Followed the steps in the link [http://docs.oracle.com/html/B13895_01/orbr_matrix.htm] to create a matrix report, In the above link they used only one table EMP to create the matrix report, but my requirment is based on two table i have to create this matrix report.
This is my sample code,
SELECT e.DEPTNO, e.JOB, SUM(SAL),d.loc
FROM EMP e,dept d
where e.DEPTNO = d.DEPTNO(+)
GROUP BY e.DEPTNO, e.JOB,d.loc
ORDER BY e.DEPTNO, e.JOBand i need layout like below
---------------------------------------------ANALYST---------CLERK---------MANAGER---------PRESIDENT---------SALESMEN---------LOCATION---------
---------10------------------------------------0.00------------1300.00---------2450.00------------5000.00--------------0.00--------------NEWYORK---------
---------20-------------------------------6000.00------------1900.00---------2975.00-----------------0.00--------------0.00--------------DALLAS-------------
---------30------------------------------------0.00--------------950.00---------2850.00----------------0.00----------5600.00--------------CHICAGO-----------
Can anyone help me in this,
Brgds,
SriGDear ,
In Matrix Report , There are 2 or more then 2 Repeating frames , As report in going out of page u may have to set the Left to Right Repeating Frame
Sajid -
Hi,
I need to create a matrix report like
for example
item as row and average selling price and average cost price as columns. But the average prices are Year wise like for 1999,2000,2001 etc. And the years vary depending on the parameters passed to the report.
Average sell price Average cost price
Item Name 1999 2000 2001 2002 1999 2000 2001 2002
Item1 100 121 122 123 150 175 176 180
How can I generate the year columns twice in the report. Item name ,prices and year are from base table. But the range of years is passed as parameter.
Pls help in this regard.
Regards,
Chandra
([email protected])Hi,
Design a matrix report with Item as rows and year as column. You do not need to have year coulnm twice in the report. Create two additions formula coulmn for "average selling price" and "average cost price". These two column values shall be computed for every matix crosssection. Chosse these two columns as the matrix cell columns. You can use range of years passed parameter in query itself to limit the data.
Hope this helps!
Thanks,
Rohit
Maybe you are looking for
-
Can I open multiple Paypal accounts to accept payments for multiple businesses?
Hello, I plan on setting up two businesses that will use Paypal to accept payments. Can I set up two seperate Paypal accounts to accept payments for my two businesses?
-
How to create a Service Request with Oracle SOA 11g
Hi, I work with a company that is a Diamond level partner to Oracle. In one of our project with SOA 11.1.1.5 we are facing some random product issues.After much thought, we decided to contact oracle support and raise a service request and report the
-
Since 3.6 update firefox crashes while opening pdf's in webmail (xs4all)
Since the 3.6 update firefox crashes AFTER pdf's opening in webmail. I can see, work and download the pdf file, but as soon as i change or stop this action, firefox crashes immediatly. I was waiting for updates, asked my provider but still not solved
-
How can share my location in just one group message?
If I enable location sharing and share it in a particular group message, my location is then shared with ALL group messages I have in my history. Not cool. Anyone know how to fix this?
-
Post ios5: Why doesnt any music name/album changes on library show on ipod Touch 4G after sync, changes show in ipod music library, but dont sync across and show on ipod