Sum(ReportItems!..) in Matrix
Hi , I have a detail field called Frames in matrix that does calculation with ReportItem
and it'is the lowest group in the Matrix.
count(Fields!Subscription_No_.Value)*ReportItems!Textbox141.Value
I'd like to calculate Totals for Frames across parent group or whole matrix, for this fiels like sum(ReportItems!Frames.Value)
I'm getting error: The Value expression ...uses an aggregate function on a report item. Aggregate functions can be used only on report items contained in page headers and footers.
Pls help.
Hi BrBa,
Just as the error message said, ReportItems can't be used in aggregate functions, other than use it on page headers and footers. We can directly sum the field value or expression as the suggestion post by Surendranath.
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support
Similar Messages
-
In below table, the light blue rows, represents the subgroup I am trying to sum up.
The value in the "Inventory Value" contains the latest inventory value for said inventory.
Light green row is grouped by Store name, Light blue is grouped by inventory name. the expression in Inventory row for the inventory value column is =First(Fields!InventoryValue.Value).
Doing a store summation, sums up all detailed values. For example in Store A, instead of 70K, the sum would be 130K... double summing the toy soldiers and cute dolls inventory. Is there a way to do the "correct" summation or a different approach to this? Thanks!
STORE
TOTAL STORE INVENTORY VALUE
INVENTORY
% OF STORE INVENTORY
INVENTORY VALUE
WARNING DATE
STORE A
1,000,000.00
TOY SOLDIERS
2.00%
20,000.00
20,000.00
11/5/2007
20,000.00
11/2/2007
PLUSH TOYS
1.00%
10,000.00
10,000.00
11/5/2007
CUTE DOLLS
4.00%
40,000.00
40,000.00
11/2/2007
40,000.00
10/31/2007
1,000,000.00
7.00%
70,000.00
STORE B
10,000,000.00
TOY SOLDIERS
0.20%
20,000.00
20,000.00
11/5/2007
20,000.00
11/2/2007
PLUSH TOYS
0.10%
10,000.00
10,000.00
11/5/2007
CUTE DOLLS
0.40%
40,000.00
40,000.00
11/2/2007
40,000.00
10/31/2007
10,000,000.00
0.70%
70,000.00Tried the following approaches so far:
=Sum(ReportItems!InventoryValue.Value)
-- Errors out
=Sum(Fields!InventoryValue.Value,"dsSummary")
-- Created a new data set which only has the data from Light Green and Light Blue Rows (ommitted detailed rows)
Returns ungrouped sums, meaning the total sum for all stores for Inventory Value
=Sum(Fields!InventoryValue.Value)
-- Double sums inventory values (sums up the inventory values from the detailed history) -
=SUM(ReportItems!Textbox1.Value)
I have an expression column in a table created on my SSRS report. How can I in turn sum the Expression column? The expression being used is:
=FIELDS!count.Value/ReportItems!Textbox1.Value
I tried entering in the place where I want this total to go. --- but that throws an error when the page is attempted to run. And this syntax is at the top of the page, sorry for my silly formatting.Is the expression complex? Otherwise you could just replace the textbox reference with actual expression.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
The expression I used was:
=FIELDS!count.Value/ReportItems!Textbox1.Value -
Aggregate ReportItems in SSRS 2005
w
when I enter sum(reportitems!texetbox32.value) as an expression in the body of SSRS 2005 I get an error "Aggregate functions
can be used only on report items contained in page headers and footers”
I need to use it in the body of the report.
how can I use sum(ReportItems!Textbox.Value) in the body of report and not in the page headers and footersHi seanmistry,
In your case, we can try to sum the field value first. For example, we can use the following expression to sum the field value:
=Sum(Fields!Your_Fields.Value, ”Scope”)
Then, we can use ReportItems built-in collection to get the total value. For example:
=ReportItems!Textbox_Name.Value
For more information about Using the ReportItems Collection References in Expressions, please see:
http://msdn.microsoft.com/en-us/library/bb934329(v=sql.100).aspx
Regards,
Bin Long
TechNet
Subscriber Supportin
forum
If you have any feedback on our support, please contact
[email protected]
Please remember to mark the replies as answers if they help and unmark them if they provide no help. -
I have the following matrix report layout:
| YEAR
| Program
SalesRep | Month | Sum(Last Year Stuff) | Sum(This Year Stuff)
How do I calculate YTD for 2013, 2014?
I tried this expression below, it worked on month level (showing Jan) but YTD Total showed 12 month total.
= round(Sum(iif(Fields!month_date.Value>DatePart(DateInterval.Month,Parameters!date.Value),0, (Fields!Prev12MonthStuff.Value))))
I tried to put sum(ReportItems!TextboxStuff.Value) into YTD (group total) row, but got an error:
“Aggregate function can be used only on report itemscontained in page headers and footers”Hi BrBa,
Per my understanding that you want to calculate the YTD value of each year based on the Calendar date parameter, right?
I have some doubt about what the expect value of YTD you mean, for example, you have mentioned that if Parameters!date.Value='1/27/15' , you will expect to see LYTD sales up to 1/31 for 2013,2014,2015 ,If that means get the value of the Month Jan
of each year like below, right?
2013 2014
2015
YTD 17,813 24,184 24,184 14,814 31,486 51,616
If you select "2/01/2015", it will calculate the YTD for each year of (Jan + Feb) ?
I have tested on my local environment that using the expression as you have provided can get the aggregate value of the months based on the data in the parameter as below:
= round(Sum(iif(Fields!month_date.Value>DatePart(DateInterval.Month,Parameters!date.Value),0, (Fields!Prev12MonthStuff.Value))))
You can see the expression works fine as you expected.
Please provide the sample data of all the field of the table in the DB and also more details information about the YTD values you want to get if I have some misunderstanding.
Any problem, please feel free to ask.
Regards
Vicky Liu
Vicky Liu
TechNet Community Support -
Calculating Excel formulas in Flex
Does anybody know of any AS3/Flex component
which can calculate Excel like formulas,
say: SUM(A1:A3) or (B11-C11)*24 ?
Or at least something to parse them to break into operands ?
TIA,
Oleg.Column1 Column2
Column 3
5 10
=5+10
Here text box 1 .value = 5
textbox2.value = 10
textbox3.value = text box1 .value + textbox2.value
Instead of referring Fields in Formula, Use Text box values...
=ReportItems!Textbox1.value + ReportItems!Textbox2.value
HI Gayathri ,
How about this one
col1 co12 col1+col2
1 2 3
4 5 9
2 2 4
Assuming the col1+col2 columns cell expression to be Reportitems!<col1-cells textbox-Name>.Value +ReportItems!<col2-cells textbox-Name>
Now my page header textbox consisting an expression as =sum(ReportItems!<(col1+col2)-cells textbox-Name>.Value
Now do you think changing col1 value reflects both col1+col2 value and Header value ?
I think it might reflect col1+col2 column value but not inturn reflects the headervalue .
Thanks .
Rajkumar Yelugu -
Hello,
I need to have a report that will have formulas in excel. I understand that the limited support for exporting excel formulas has been dropped in SSRS 2008. Is there any way to work around this and still output formulas?
obvioulsy the way to do it in previous versions of SSRS are not working (using report items). I tried to add my formulas in my dataset (I can know which excel cells I need in the formulas) but they end up being displayed as text. I then have to get in the
excel file and enter and exit each cell so that it "becomes" a formula.
thanks a lot!
SimonColumn1 Column2
Column 3
5 10
=5+10
Here text box 1 .value = 5
textbox2.value = 10
textbox3.value = text box1 .value + textbox2.value
Instead of referring Fields in Formula, Use Text box values...
=ReportItems!Textbox1.value + ReportItems!Textbox2.value
HI Gayathri ,
How about this one
col1 co12 col1+col2
1 2 3
4 5 9
2 2 4
Assuming the col1+col2 columns cell expression to be Reportitems!<col1-cells textbox-Name>.Value +ReportItems!<col2-cells textbox-Name>
Now my page header textbox consisting an expression as =sum(ReportItems!<(col1+col2)-cells textbox-Name>.Value
Now do you think changing col1 value reflects both col1+col2 value and Header value ?
I think it might reflect col1+col2 column value but not inturn reflects the headervalue .
Thanks .
Rajkumar Yelugu -
Hi All,
The requirement is as follows...
Example:
Sum = 7
Availability Matrix = [5, 4, 6, 1]
Required: I need all set of possible unique combinations that sums to 7 out of the availability.
Few example combinations: [5, 2, 0, 0], [4, 3, 0, 0], [3, 4, 0, 0]
I also have a few questions...
+? Can we tell the number of unique number of solutions that can be formed well in advance.+
+? There are many solutions to this problem which one would be the good in terms of performance imagine when the availabilty matrix is huge+
Early help would be appreciated.
Thanks,
Vj_vijay_kumar wrote:
Sum = 7
Availability Matrix = [5, 4, 6, 1]
Required: I need all set of possible unique combinations that sums to 7 out of the availability.
Few example combinations: [5, 2, 0, 0], [4, 3, 0, 0], [3, 4, 0, 0]
What have those combinations got to do with the "availability matrix"?
It may be the same problem as [this one|http://www.codeguru.com/forum/showthread.php?t=463618] , but (maybe) a restricted set of values.
Can we tell the number of unique number of solutions that can be formed well in advance.Possibly. Do the math - you can make 7 one way with 1s, 3 ways with 2s and 1, 3 ways with 3s,2s,1s, 3 ways with 4,3s,2s,1s, 2ways with 5s..., 1ways with 6s... . You should be able to create a recurrence based on removing a value from N then the number of ways of calculating the result; then analyse that formula to see if it yields a direct one. -
Logic to generate some pattern
Hi All,
The requirement is something like this.......
Example:
Sum = 7
Availability Matrix = [5, 4, 6, 1]
Required: I need all set of possible unique combinations that sums to 7.
Few example combinations: [5, 2, 0, 0], [4, 3, 0, 0], [3, 4, 0, 0]
I also have a few questions...
? Can we tell the number of unique number of solutions that can be formed well in advance.
? There are many solutions to this problem which one would be the good in terms of performance imagine when the availabilty matrix is huge
Early help would be appreciated.
Thanks,
VPlease don't create more than one thread with the same question.
Continues here: [http://forums.sun.com/thread.jspa?threadID=5345838] -
Hi all,
I have a table contains data in following format
year style jan feb mar
2001 a 10 5 6
2002 a 5 5 6
2003 a 10 10 6
2004 a 5 6 6
for this detail I want to create view that should have a structure as following
style 2001 2002 2003 2004
a 21 16 26 17
any clue how I can achive this?scott@ORA92> -- test table and test data:
scott@ORA92> SELECT * FROM your_table
2 /
YEAR S JAN FEB MAR
2001 a 10 5 6
2002 a 5 5 6
2003 a 10 10 6
2004 a 5 6 6
scott@ORA92> -- create view:
scott@ORA92> CREATE OR REPLACE VIEW your_view AS
2 SELECT style,
3 SUM (DECODE (year, 2001, jan + feb + mar)) AS "2001",
4 SUM (DECODE (year, 2002, jan + feb + mar)) AS "2002",
5 SUM (DECODE (year, 2003, jan + feb + mar)) AS "2003",
6 SUM (DECODE (year, 2004, jan + feb + mar)) AS "2004"
7 FROM your_table
8 GROUP BY style
9 /
View created.
scott@ORA92> -- select from view:
scott@ORA92> SELECT * FROM your_view
2 /
S 2001 2002 2003 2004
a 21 16 26 17 -
How To hide a column on a Matrix using a parameter that is set-up as a multi-select
Hi,
I have a multi-select parameter (has 4 choices ie. A,B,C,D). In the matrix the parent Column group is a date and the child group is based on the Multi-select parameter field. When all choices are selected the report returns a column per
date and then within that date column 4 sub columns as expected.....This all works.
Challenge ... I added another column (Col5). For Col5 I only want it to show if value B has been selected from the multi choice
Another way of saying it.... How do I get a column to appear (Visibility) if a specific Value has been select in a multi-choice parameter
Tx
Andrew
Andrew PayzeHi,
here is the query
SELECT ProjectNumber, ProjectDescription, WBS, TaskNumber, TaskName, TaskDescription, TaskManager, Results, ResourceExpenditure, CostSet, Currency,
ReportingDate, Value, YEAR(ReportingDate) AS Year, { fn MONTHNAME(ReportingDate) } AS Month, ActualValue, PriorEAC
FROM vwForecastAccuracy
WHERE (CostSet IN (@CostType)) AND (YEAR(ReportingDate) = @Year) AND (Results = 'Cost')
below is the Code, not sure how to attach RDL
Thanks
Andrew
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<ReportItems>
<Tablix Name="matrix1">
<TablixCorner>
<TablixCornerRows>
<TablixCornerRow>
<TablixCornerCell>
<CellContents>
<Textbox Name="textbox3">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>Tahoma</FontFamily>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox3</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCornerCell>
</TablixCornerRow>
<TablixCornerRow>
<TablixCornerCell>
<CellContents>
<Textbox Name="Textbox8">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>Tahoma</FontFamily>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox8</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCornerCell>
</TablixCornerRow>
</TablixCornerRows>
</TablixCorner>
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>1in</Width>
</TablixColumn>
<TablixColumn>
<Width>1in</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.21in</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Value">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Sum(Fields!Value.Value)</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<Format>'$'#,0;('$'#,0)</Format>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Value</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<rd:FormatSymbolCulture>en-US</rd:FormatSymbolCulture>
</Style>
</Textbox>
</CellContents>
<DataElementOutput>Output</DataElementOutput>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox4">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=RunningValue(Fields!ActualValue.Value,sum, "matrix1_ProjectNumber")</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
<DataElementOutput>Output</DataElementOutput>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="matrix1_ReportingDate">
<GroupExpressions>
<GroupExpression>=Fields!ReportingDate.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!ReportingDate.Value</Value>
</SortExpression>
</SortExpressions>
<TablixHeader>
<Size>0.21in</Size>
<CellContents>
<Textbox Name="Month">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Month.Value</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<FontWeight>Bold</FontWeight>
<Format>MM/dd/yyyy</Format>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Month</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>#6e9eca</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<TablixMembers>
<TablixMember>
<Group Name="CostSet">
<GroupExpressions>
<GroupExpression>=Fields!CostSet.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!CostSet.Value</Value>
</SortExpression>
</SortExpressions>
<TablixHeader>
<Size>0.25in</Size>
<CellContents>
<Textbox Name="CostSet1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!CostSet.Value</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>CostSet1</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>#6e9eca</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<TablixMembers>
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixMember>
</TablixMembers>
<DataElementOutput>Output</DataElementOutput>
<KeepTogether>true</KeepTogether>
</TablixMember>
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="matrix1_ProjectNumber">
<GroupExpressions>
<GroupExpression>=Fields!ProjectNumber.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!ProjectNumber.Value</Value>
</SortExpression>
</SortExpressions>
<TablixHeader>
<Size>1in</Size>
<CellContents>
<Textbox Name="ProjectNumber">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!ProjectNumber.Value</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>ProjectNumber</rd:DefaultName>
<ActionInfo>
<Actions>
<Action>
<Drillthrough>
<ReportName>BUDVAR 11 Budget Detail By WBS</ReportName>
<Parameters>
<Parameter Name="ProjectNumber">
<Value>=Fields!ProjectNumber.Value</Value>
</Parameter>
<Parameter Name="Year">
<Value>=Parameters!Year.Value</Value>
</Parameter>
<Parameter Name="CostSet">
<Value>=Parameters!CostType.Value</Value>
</Parameter>
</Parameters>
</Drillthrough>
</Action>
</Actions>
</ActionInfo>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>#6e9eca</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<DataElementOutput>Output</DataElementOutput>
<KeepTogether>true</KeepTogether>
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<RepeatColumnHeaders>true</RepeatColumnHeaders>
<RepeatRowHeaders>true</RepeatRowHeaders>
<DataSetName>BudgetData</DataSetName>
<Height>0.67in</Height>
<Width>3in</Width>
<Style />
</Tablix>
</ReportItems>
<Height>0.84708in</Height>
<Style />
</Body>
<Width>3.85417in</Width>
<Page>
<LeftMargin>1in</LeftMargin>
<RightMargin>1in</RightMargin>
<TopMargin>1in</TopMargin>
<BottomMargin>1in</BottomMargin>
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="BIDatabase">
<DataSourceReference>VSPDEV011</DataSourceReference>
<rd:SecurityType>None</rd:SecurityType>
<rd:DataSourceID>f3bf5788-4fb5-4822-89d9-2f4518f5488d</rd:DataSourceID>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="BudgetData">
<Query>
<DataSourceName>BIDatabase</DataSourceName>
<QueryParameters>
<QueryParameter Name="@CostType">
<Value>=Parameters!CostType.Value</Value>
</QueryParameter>
<QueryParameter Name="@Year">
<Value>=Parameters!Year.Value</Value>
</QueryParameter>
</QueryParameters>
<CommandText>SELECT ProjectNumber, ProjectDescription, WBS, TaskNumber, TaskName, TaskDescription, TaskManager, Results, ResourceExpenditure, CostSet, Currency,
ReportingDate, Value, YEAR(ReportingDate) AS Year, { fn MONTHNAME(ReportingDate) } AS Month, ActualValue, PriorEAC
FROM vwForecastAccuracy
WHERE (CostSet IN (@CostType)) AND (YEAR(ReportingDate) = @Year) AND (Results = 'Cost')</CommandText>
</Query>
<Fields>
<Field Name="ProjectNumber">
<DataField>ProjectNumber</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ProjectDescription">
<DataField>ProjectDescription</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="WBS">
<DataField>WBS</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="TaskNumber">
<DataField>TaskNumber</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="TaskName">
<DataField>TaskName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="TaskDescription">
<DataField>TaskDescription</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="TaskManager">
<DataField>TaskManager</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Results">
<DataField>Results</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ResourceExpenditure">
<DataField>ResourceExpenditure</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="CostSet">
<DataField>CostSet</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Currency">
<DataField>Currency</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ReportingDate">
<DataField>ReportingDate</DataField>
<rd:TypeName>System.DateTime</rd:TypeName>
</Field>
<Field Name="Value">
<DataField>Value</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="Year">
<DataField>Year</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="Month">
<DataField>Month</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ActualValue">
<DataField>ActualValue</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="PriorEAC">
<DataField>PriorEAC</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
</Fields>
</DataSet>
<DataSet Name="ProjectLookup">
<Query>
<DataSourceName>BIDatabase</DataSourceName>
<CommandText>SELECT DISTINCT ProjectNumber, ProjectDescription, ProjectNumber AS Expr1
FROM vwForecastAccuracy</CommandText>
</Query>
<Fields>
<Field Name="ProjectNumber">
<DataField>ProjectNumber</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ProjectDescription">
<DataField>ProjectDescription</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Expr1">
<DataField>Expr1</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
</DataSet>
<DataSet Name="CostTypeLookup">
<Query>
<DataSourceName>BIDatabase</DataSourceName>
<CommandText>SELECT DISTINCT CostSet, CostSet AS CostSetDesc
FROM vwForecastAccuracy
UNION
SELECT NULL AS Expr1, 'All' AS CostSetDesc
ORDER BY CostSet</CommandText>
</Query>
<Fields>
<Field Name="CostSet">
<DataField>CostSet</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="CostSetDesc">
<DataField>CostSetDesc</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
</DataSet>
<DataSet Name="YearLookup">
<Query>
<DataSourceName>BIDatabase</DataSourceName>
<CommandText>SELECT DISTINCT YEAR(ReportingDate) AS Year
FROM vwForecastAccuracy
ORDER BY Year</CommandText>
</Query>
<Fields>
<Field Name="Year">
<DataField>Year</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
</Fields>
</DataSet>
</DataSets>
<ReportParameters>
<ReportParameter Name="Year">
<DataType>String</DataType>
<Prompt>Year</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>YearLookup</DataSetName>
<ValueField>Year</ValueField>
<LabelField>Year</LabelField>
</DataSetReference>
</ValidValues>
</ReportParameter>
<ReportParameter Name="CostType">
<DataType>String</DataType>
<Prompt>Cost Set</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>CostTypeLookup</DataSetName>
<ValueField>CostSet</ValueField>
<LabelField>CostSetDesc</LabelField>
</DataSetReference>
</ValidValues>
<MultiValue>true</MultiValue>
</ReportParameter>
</ReportParameters>
<Language>en-US</Language>
<ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<rd:ReportID>19da6d82-a69b-4bb7-a634-2fee3191c5d8</rd:ReportID>
</Report>
Andrew Payze -
Hello Community
Using Visual Studio 2008 I have created a Windows Forms Application in which I created
Embedded Reports (rdlc).
The embedded reports (rdlc) uses Matrix(s).
Now on this one rdlc I have dragged 2 Matrix(s) onto the body.
One of the Matrix datasource dataset name and table name is "DataSet1_Table1.
A cells in the Matrix has a total column on the end as follows:
=FormatNumber(Sum(Fields!fld1.Value)+Sum(Fields!fld2.Value)+Sum(Fields!fld3.Value)+Sum(Fields!fld4.Value)+Sum(Fields!fld5.Value),"0")
The other Matrix datasource dataset name and table name is "DataSet2_Table2.
The cell in this Matrix has a total column on the end as follows:
=Sum(Fields!fld1.Value)+Sum(Fields!fld2.Value)+Sum(Fields!fld3.Value)+Sum(Fields!fld4.Value)+Sum(Fields!fld5.Value)
As you can see each Matrix has a different table.
I would like to add the total columns from each table in each Matrix but I haven't been
able to do it successfully. If I have to drag another Matrix or a Textbox on the
body to do it that is okay and/or add another/different formula to a cell onto the body that is
okay too.
So my question is how can I add the contents of the total in cell from each table in each matrix
which will create the "grand total"?
Thank you
ShabeautIt is possible to reference SSRS elements directly using the ReportItems collection. If your total tablix cell is outside of yoour matrix groups, you can use this collection to accomplish what you want:
=ReportItems!Matrix1Total.Value + ReportItems!Matrix2Total.Value
where Matrix1Total and Matrix2Total is the name of the cell that contains your totals. Note that for this to work, the cell name must be unique. If the total cell is inside a group, it will be repeated once for each instance of the group and will not be
unique.
You may be able to do it using the Sum aggregate and specifying the dataset for the scope variable:
=Sum(Fields!fld1.Value, "DataSet1")+Sum(Fields!fld2.Value,
"DataSet1")+Sum(Fields!fld3.Value,
"DataSet1")+Sum(Fields!fld4.Value,
"DataSet1")+Sum(Fields!fld5.Value,
"DataSet1")+Sum(Fields!fld1.Value,
"DataSet2")+Sum(Fields!fld2.Value,
"DataSet2")+Sum(Fields!fld3.Value,
"DataSet2")+Sum(Fields!fld4.Value,
"DataSet2")+Sum(Fields!fld5.Value,
"DataSet2")
This will work as long as you are not filtering the dataset in your Matrix properties. If you are, those
filters will not apply to this expression and the numbers will not total correctly.
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek. -
Dynamically assigning aggregation type in a matrix table
I have a matrix table that will produce multiple summary columns. These columns should not all use Sum in the Totals row at the bottom. Some will any of these to be determined at runtime: Sum, Avg, Count, Min, Max. I have a column in the
underlying dataset that will tell me which aggregation type to use and now I need some logic in the summary cell to use the correct aggregation type. I tried different variation of this:
=IIF(Fields!AgType = "Sum", Sum(Fields!VI_Impact.Value), … next IIF statement….
And here’s the full line
=IIF(Fields!AgType = "Sum", Sum(Fields!VI_Impact.Value), IIF(Fields!AgType = "Avg", Avg(Fields!VI_Impact.Value), IIF(Fields!AgType = "Cnt", Count(Fields!VI_Impact.Value), IIF(Fields!AgType
= "Min", Min(Fields!VI_Impact.Value), IIF(Fields!AgType = "Max", Max(Fields!VI_Impact.Value), 0)))))
I also replaced the zero at the end with another sum statement as a default if nothing else is used.
Just to keep it real simple for proof of concept, I used:
=IIF(Fields!AgType = "Sum", Sum(Fields!VI_Impact.Value), Sum(Fields!VI_Impact.Value))
But the report gets the error:
The Value expression for the textrun ‘VI_Impact.Paragraphs[0].TextRuns[0]’ contains an error: [BC30311] Value of type ‘Microsoft.ReportingServies.ReportProcessing.ReportObjectModel.field’ Cannot be converted to ‘String’
Any idea how I can make this work?Thanks Jason. I've put an sql script below that will create a test table and populate it with test data. I also attached an rdl file so after you run the script and load the report, all you need to do is update the report's data source
to the correct database and you will see exactly what I'm trying to do.
This report table creates a maxtrix with 4 SUM columns to the right. as you will see in the data, the column headers are named by "VA", and column "AgType" shows how the column should be aggregated. Once you run the report
and look at the data it should be easy to understand.
Thanks for any help you can offer.
DESCRIPTION: Schema Synchronization Script for Object(s) \r\n
tables:
[dbo].[zzzRptValueImpactListing]
AUTHOR: [Insert Author Name]
DATE: 11/19/2014 5:17:57 PM
LEGAL: 2013[Insert Company Name]
SET NOEXEC OFF
SET ANSI_WARNINGS ON
SET XACT_ABORT ON
SET IMPLICIT_TRANSACTIONS OFF
SET ARITHABORT ON
SET NOCOUNT ON
SET QUOTED_IDENTIFIER ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
GO
USE [VME_KP]
GO
BEGIN TRAN
GO
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
IF @@ERROR<>0 OR @@TRANCOUNT=0 BEGIN IF @@TRANCOUNT>0 ROLLBACK SET NOEXEC ON END
GO
-- Create Table [dbo].[zzzRptValueImpactListing]
Print 'Create Table [dbo].[zzzRptValueImpactListing]'
GO
CREATE TABLE [dbo].[zzzRptValueImpactListing] (
[Id_Number] [int] NULL,
[Id_Name] [nvarchar](4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VA] [nvarchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VI_Impact] [decimal](18, 3) NULL,
[Id_Assignees] [nvarchar](500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AgType] [nvarchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Pj_Id] [uniqueidentifier] NOT NULL
GO
IF @@ERROR<>0 OR @@TRANCOUNT=0 BEGIN IF @@TRANCOUNT>0 ROLLBACK SET NOEXEC ON END
GO
ALTER TABLE [dbo].[zzzRptValueImpactListing] SET (LOCK_ESCALATION = TABLE)
GO
IF @@ERROR<>0 OR @@TRANCOUNT=0 BEGIN IF @@TRANCOUNT>0 ROLLBACK SET NOEXEC ON END
GO
IF @@TRANCOUNT>0
COMMIT
SET NOEXEC OFF
DESCRIPTION: Synchronization Script for Object(s)
Tables:
[dbo].[zzzRptValueImpactListing]
AUTHOR: [Insert author name]
DATE: 11/19/2014 5:50:25 PM
LEGAL: 2014 [Insert company name]
SET NOEXEC OFF
SET ANSI_WARNINGS ON
SET XACT_ABORT ON
SET IMPLICIT_TRANSACTIONS OFF
SET ARITHABORT ON
SET NOCOUNT ON
SET QUOTED_IDENTIFIER ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
GO
BEGIN TRAN
-- =======================================================
-- Synchronization Script for Table: [dbo].[zzzRptValueImpactListing]
-- =======================================================
Print 'Synchronization Script for Table: [dbo].[zzzRptValueImpactListing]'
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (5, N'Change from double tape to liquid glue', N'Prod Cost', CONVERT([decimal](18, 3),-0.050), N'Philipp Bart
Steve Stewart', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (7, N'Position of NTC out of contact area', N'Complexity', CONVERT([decimal](18, 3),-170.000), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (7, N'Position of NTC out of contact area', N'Mrk Conf', CONVERT([decimal](18, 3),8.000), NULL, N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (8, N'Change type of patches', N'Mrk Conf', CONVERT([decimal](18, 3),7.000), NULL, N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (9, N'Reduce winding turns for harness', N'Mrk Conf', CONVERT([decimal](18, 3),8.000), NULL, N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (9, N'Reduce winding turns for harness', N'Relblty', CONVERT([decimal](18, 3),1.500), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (11, N'Use fix sizes of carrier material rolls', N'Prod Cost', CONVERT([decimal](18, 3),-0.310), N'Marc Pauwels', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (11, N'Use fix sizes of carrier material rolls', N'Prod Cost', CONVERT([decimal](18, 3),-0.310), N'Marc Pauwels', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (12, N'Cold pressing process for laying or needle technology', N'Prod Cost', CONVERT([decimal](18, 3),0.080), N'George Padvorac', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (12, N'Cold pressing process for laying or needle technology', N'Relblty', CONVERT([decimal](18, 3),0.500), N'George Padvorac', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (13, N'Liquid cold gluing instead of hot processing', N'Complexity', CONVERT([decimal](18, 3),-100.000), N'Philipp Blattert', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (13, N'Liquid cold gluing instead of hot processing', N'Mrk Conf', CONVERT([decimal](18, 3),8.000), N'Philipp Blattert', N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (14, N'Confidential', N'Prod Cost', CONVERT([decimal](18, 3),-0.020), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (16, N'Decrease positioning tolerances to reduce distance between parts', N'Complexity', CONVERT([decimal](18, 3),-40.000), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (16, N'Decrease positioning tolerances to reduce distance between parts', N'Prod Cost', CONVERT([decimal](18, 3),-0.060), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (17, N'Control and reduce amount of thermoactive glue', N'Prod Cost', CONVERT([decimal](18, 3),-0.030), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (18, N'Pull off force harness: reduce spec', N'Complexity', CONVERT([decimal](18, 3),-50.000), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (18, N'Pull off force harness: reduce spec', N'Complexity', CONVERT([decimal](18, 3),-50.000), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (18, N'Pull off force harness: reduce spec', N'Mrk Conf', CONVERT([decimal](18, 3),6.000), NULL, N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (18, N'Pull off force harness: reduce spec', N'Mrk Conf', CONVERT([decimal](18, 3),6.000), NULL, N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (18, N'Pull off force harness: reduce spec', N'Prod Cost', CONVERT([decimal](18, 3),-0.040), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (18, N'Pull off force harness: reduce spec', N'Prod Cost', CONVERT([decimal](18, 3),-0.040), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (23, N'Simplify and stabilize contact process', N'Mrk Conf', CONVERT([decimal](18, 3),6.000), NULL, N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (23, N'Simplify and stabilize contact process', N'Prod Cost', CONVERT([decimal](18, 3),-0.320), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (23, N'Simplify and stabilize contact process', N'Relblty', CONVERT([decimal](18, 3),1.500), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (24, N'Decrease positioning tolerances to reduce distance between parts', N'Prod Cost', CONVERT([decimal](18, 3),-0.210), N'Mark Powel
Philipp Bart', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (25, N'Separate extension of carrier material, than assembly by gluing', N'Complexity', CONVERT([decimal](18, 3),-20.000), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (25, N'Separate extension of carrier material, than assembly by gluing', N'Prod Cost', CONVERT([decimal](18, 3),-0.230), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (26, N'Use higher emission foam/fleece where possible', N'Mrk Conf', CONVERT([decimal](18, 3),7.000), N'Craig Squires
Stacy Johnson', N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (27, N'Reduce material variance fleece: width, composites, glue or not,', N'Complexity', CONVERT([decimal](18, 3),-5.000), N'Stacy Johnson', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (28, N'Confidential', N'Relblty', CONVERT([decimal](18, 3),4.000), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (29, N'Reduce material variance tape: width, composites', N'Complexity', CONVERT([decimal](18, 3),-3.000), N'Steve Stewart', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (29, N'Reduce material variance tape: width, composites', N'Prod Cost', CONVERT([decimal](18, 3),-0.350), N'Steve Stewart', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (29, N'Reduce material variance tape: width, composites', N'Relblty', CONVERT([decimal](18, 3),3.000), N'Steve Stewart', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
GO
-- TRANSACTION HANDLING
IF @@ERROR<>0 OR @@TRANCOUNT=0 BEGIN IF @@TRANCOUNT>0 ROLLBACK SET NOEXEC ON END
GO
IF @@TRANCOUNT>0
COMMIT
SET NOEXEC OFF
GO
Here's the code for the rdl file:
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<ReportItems>
<Tablix Name="matrix1">
<TablixCorner>
<TablixCornerRows>
<TablixCornerRow>
<TablixCornerCell>
<CellContents>
<Textbox Name="textbox3">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>#</Value>
<Style>
<FontWeight>Bold</FontWeight>
<Color>#054974</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox3</rd:DefaultName>
<ToolTip>Idea Number</ToolTip>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>#fafafa</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCornerCell>
<TablixCornerCell>
<CellContents>
<Textbox Name="Textbox13">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Idea</Value>
<Style>
<FontWeight>Bold</FontWeight>
<Color>#054974</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox13</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>#fafafa</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCornerCell>
<TablixCornerCell>
<CellContents>
<Textbox Name="Textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Assignees</Value>
<Style>
<FontWeight>Bold</FontWeight>
<Color>#054974</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>#fafafa</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCornerCell>
</TablixCornerRow>
</TablixCornerRows>
</TablixCorner>
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>0.95in</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.3in</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="textbox2">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Sum(Fields!VI_Impact.Value)</Value>
<Style>
<Format>#,###.###</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox2</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>None</Style>
</Border>
<TopBorder>
<Color>LightGrey</Color>
<Style>Solid</Style>
</TopBorder>
<BottomBorder>
<Color>LightGrey</Color>
<Style>Solid</Style>
</BottomBorder>
<LeftBorder>
<Color>LightGrey</Color>
<Style>Solid</Style>
</LeftBorder>
<RightBorder>
<Color>LightGrey</Color>
<Style>Solid</Style>
</RightBorder>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>4pt</PaddingRight>
<PaddingTop>3pt</PaddingTop>
<PaddingBottom>3pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
<DataElementOutput>Output</DataElementOutput>
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.25in</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="VI_Impact">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Sum(Fields!VI_Impact.Value)</Value>
<Style>
<FontWeight>Bold</FontWeight>
<Format>#,###.###</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>VI_Impact</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>None</Style>
</Border>
<TopBorder>
<Color>LightGrey</Color>
<Style>Solid</Style>
</TopBorder>
<BottomBorder>
<Color>LightGrey</Color>
<Style>Solid</Style>
</BottomBorder>
<LeftBorder>
<Color>LightGrey</Color>
<Style>Solid</Style>
</LeftBorder>
<RightBorder>
<Color>LightGrey</Color>
<Style>Solid</Style>
</RightBorder>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>4pt</PaddingRight>
<PaddingTop>3pt</PaddingTop>
<PaddingBottom>3pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
<DataElementOutput>Output</DataElementOutput>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="matrix1_VA">
<GroupExpressions>
<GroupExpression>=Fields!VA.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!VA.Value</Value>
</SortExpression>
</SortExpressions>
<TablixHeader>
<Size>0.3in</Size>
<CellContents>
<Textbox Name="VA">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!VA.Value</Value>
<Style>
<FontWeight>Bold</FontWeight>
<Color>#054974</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>VA</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>WhiteSmoke</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>4pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<DataElementOutput>Output</DataElementOutput>
<KeepTogether>true</KeepTogether>
</TablixMember>
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="Id_Pj_Id">
<GroupExpressions>
<GroupExpression>=Fields!Pj_Id.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!Id_Number.Value</Value>
</SortExpression>
</SortExpressions>
<TablixMembers>
<TablixMember>
<Group Name="matrix1_Id_Number">
<GroupExpressions>
<GroupExpression>=Fields!Id_Number.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!Id_Number.Value</Value>
</SortExpression>
</SortExpressions>
<TablixHeader>
<Size>0.4in</Size>
<CellContents>
<Textbox Name="Id_Number">
<CanGrow>true</CanGrow>
<CanShrink>true</CanShrink>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Id_Number.Value</Value>
<Style />
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Id_Number</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BottomBorder>
<Color>LightGrey</Color>
</BottomBorder>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<TablixMembers>
<TablixMember>
<Group Name="matrix1_Id_Name">
<GroupExpressions>
<GroupExpression>=Fields!Id_Name.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!Id_Name.Value</Value>
</SortExpression>
</SortExpressions>
<TablixHeader>
<Size>4.81979in</Size>
<CellContents>
<Textbox Name="Id_Name">
<CanGrow>true</CanGrow>
<CanShrink>true</CanShrink>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Id_Name.Value</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Id_Name</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>None</Style>
</Border>
<TopBorder>
<Style>Solid</Style>
</TopBorder>
<BottomBorder>
<Color>LightGrey</Color>
<Style>Solid</Style>
</BottomBorder>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>3pt</PaddingTop>
<PaddingBottom>3pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<TablixMembers>
<TablixMember>
<TablixHeader>
<Size>1.33333in</Size>
<CellContents>
<Textbox Name="Id_Assignees">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Id_Assignees.Value</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Id_Assignees</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>None</Style>
</Border>
<TopBorder>
<Color>LightGrey</Color>
<Style>Solid</Style>
</TopBorder>
<BottomBorder>
<Color>LightGrey</Color>
<Style>Solid</Style>
</BottomBorder>
<LeftBorder>
<Color>LightGrey</Color>
<Style>Solid</Style>
</LeftBorder>
<RightBorder>
<Color>LightGrey</Color>
<Style>Solid</Style>
</RightBorder>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>3pt</PaddingTop>
<PaddingBottom>3pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
</TablixMembers>
<DataElementOutput>Output</DataElementOutput>
<KeepTogether>true</KeepTogether>
</TablixMember>
</TablixMembers>
<DataElementOutput>Output</DataElementOutput>
</TablixMember>
<TablixMember>
<TablixHeader>
<Size>0.4in</Size>
<CellContents>
<Textbox Name="Textbox35">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style />
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox35</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>None</Style>
</Border>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<TablixMembers>
<TablixMember>
<TablixHeader>
<Size>4.81979in</Size>
<CellContents>
<Textbox Name="Textbox36">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox36</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>None</Style>
</Border>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>4pt</PaddingRight>
<PaddingTop>3pt</PaddingTop>
<PaddingBottom>3pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<TablixMembers>
<TablixMember>
<TablixHeader>
<Size>1.33333in</Size>
<CellContents>
<Textbox Name="Textbox6">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Totals</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox6</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>None</Style>
</Border>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>4pt</PaddingRight>
<PaddingTop>3pt</PaddingTop>
<PaddingBottom>3pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
</TablixMembers>
</TablixMember>
</TablixMembers>
<KeepWithGroup>Before</KeepWithGroup>
</TablixMember>
</TablixMembers>
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<RepeatColumnHeaders>true</RepeatColumnHeaders>
<RepeatRowHeaders>true</RepeatRowHeaders>
<DataSetName>DataSet1</DataSetName>
<Top>0.30375in</Top>
<Height>0.85in</Height>
<Width>7.50312in</Width>
<Style />
</Tablix>
</ReportItems>
<Height>1.845in</Height>
<Style />
</Body>
<Width>8.42925in</Width>
<Page>
<PageHeight>8.5in</PageHeight>
<PageWidth>14in</PageWidth>
<LeftMargin>0.25in</LeftMargin>
<RightMargin>0.25in</RightMargin>
<TopMargin>0.25in</TopMargin>
<BottomMargin>0.25in</BottomMargin>
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="VEMasterDataSource">
<DataSourceReference>VEMasterDataSource</DataSourceReference>
<rd:SecurityType>None</rd:SecurityType>
<rd:DataSourceID>c76f7aa3-8f20-4495-a1bf-0b7a2ede98e3</rd:DataSourceID>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<DataSourceName>VEMasterDataSource</DataSourceName>
<CommandText>select * from zzzRptValueImpactListing</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
<Fields>
<Field Name="Id_Number">
<DataField>Id_Number</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="Id_Name">
<DataField>Id_Name</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="VA">
<DataField>VA</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="VI_Impact">
<DataField>VI_Impact</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="Id_Assignees">
<DataField>Id_Assignees</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="AgType">
<DataField>AgType</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Pj_Id">
<DataField>Pj_Id</DataField>
<rd:TypeName>System.Guid</rd:TypeName>
</Field>
</Fields>
</DataSet>
</DataSets>
<Language>en-US</Language>
<ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<rd:ReportID>86e382ea-6e9e-46b0-a5c1-7bf67abfdcf5</rd:ReportID>
</Report> -
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 -
How to display calculated matrix columns in a graph?
Hi,
I am working in VisualStudio 2010 hitting SQL Server 2012 to build SSRS reports.
I have a need to graph year over year percentage growth as derived from two SSRS matrix columns. Everything is working except that the chart displays only one value for each year series, rather than displaying the correct percentages for each audience
for each of the two years.
The values in the chart series properties are called with the expression: =ReportItems!YoYGrowthPercent2014.Value (or =ReportItems!YoYGrowthPercent2014.Value, respectively), where "YoYGrowthPercent2014" is the name of the detail cell holding
the expression to calculate the growth percentage at the audience level in the matrix.
It looks like it should work yet the results are incorrect. I've read several hundred articles and posts at this point and do not have an answer.
Is there any way to do this? It seems like it should be so simple, and yet...
Thank you!
~Khrys.I can reproduce your issue. If you toggle open Audience P I think you will find the very last value for the last Category and the last Product_Group will be around 15% for Growth 2014 and around 23% for Growth 2015. The chart series expression
is choosing the last value for ReportItems!YoYGrowthPercentage as it doesn't know how to attribute that ReportItem to the Audience matrix. If you want a chart to display only the percentage for Audience, I suggest that you have a separate data
source with the values for GrowthPercentage for only the Audiences, and make that the data source for your chart. Also, I would make the growth figures in your matrix also a matrix by doing the percentage calculation directly in the table. You would pull in
the value for this year and the value for last year into your data set, and then do the calculation within the report as follows:
=SUM(Fields!Value.Value)/Sum(Fields!LastYearValue.Value)-1
Create a second Column Group adjacent after, also by year. Your query could look something like this, depending on how your tables are structured:
SELECT a.Audience, a.Category, a.ProductGroup, a.Year, a.Value, b.Year as LastYear, ISNULL(b.Value,0) as LastYearValue
FROM YoYGrowth a LEFT OUTER JOIN
YoYGrowth b ON a.Audience = b.Audience and a.Category= b.Category and a.ProductGroup = b.ProductGroup
AND a.Year-1 = b.Year
Hope it helps. Cheers,
Martina White
Maybe you are looking for
-
Change of baseline date in customer document
Hi Experts, Baseline date field is uneditable and when we tried changing it through Mass, it throws error and it is obvious. But user has earlier change this field without changing the payment term. He has directly changed the baseline date. Is there
-
I want to make a movie using imovie 11. I want to import still photos taken from the inet and import video clips of myself over the stills. I also want this movei to illustrate a soundtrack of my singing with a karaoke file. Is this possible? How wou
-
Cant configure airport extreme snow with airport utility
pop up says I need version 5.6 of the utility but of course that verison is not supported by 10.7.5 how do I configure my airport. Come on apple! My device works just fine, let me configure it!!!!!
-
What happened to the code reference panel from CS5?
I have been watching a CS5 Flash ActionScript tutorial, but I am using Flash CC. In the tutorial, there is a code reference panel to the left of the actions panel that has a list of all the possible code pieces, and when hovering over any of them, it
-
BAPI_QUALNOT_CREATE and field Reference no.
Hi masters. I need to create Quality Notifications via BAPI, but the bapi BAPI_QUALNOT_CREATE does not have a field to fill out the " External Reference Number" How can I set this field via BAPI calls ? It is the field REFNUM in the table QMEL