Showing posts with label cell. Show all posts
Showing posts with label cell. Show all posts

Monday, March 26, 2012

Matrix-How to tell when you're in a subtotal cell

I have a matrix where the detail cells are set to navigate to a subreport.
However I *don't* want them to provide navigation if they're in a subtotal
row or column. I can't figure out what to call in order to determine
whether the cell is a subtotal or not.
Any ideas?This is a multi-part message in MIME format.
--=_NextPart_000_0049_01C625AB.01FC8700
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Try playing around with this formula:
=3Diif(InScope("ColumnGroup1"), iif(InScope("RowGroup1"), "In Cell", ="In Subtotal of RowGroup1"), iif(InScope("RowGroup1"), "In Subtotal of =ColumnGroup1", "In Subtotal of entire matrix"))
Paste it into your usual matrix cell, and change RowGroup1 to whatever =your row group is called etc.
Kaisa M: Lindahl
"Greg S" <gregslistacct@.hotmail.com> wrote in message =news:ecBRlY7IGHA.1180@.TK2MSFTNGP09.phx.gbl...
>I have a matrix where the detail cells are set to navigate to a =subreport. > However I *don't* want them to provide navigation if they're in a =subtotal > row or column. I can't figure out what to call in order to determine > whether the cell is a subtotal or not.
> > Any ideas?
> >
--=_NextPart_000_0049_01C625AB.01FC8700
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Try playing around with this formula:
=3Diif(InScope("ColumnGroup1"), =iif(InScope("RowGroup1"), "In Cell", "In Subtotal of RowGroup1"), iif(InScope("RowGroup1"), "In =Subtotal of ColumnGroup1", "In Subtotal of entire matrix"))
Paste it into your usual matrix cell, and =change RowGroup1 to whatever your row group is called etc.
Kaisa M: Lindahl
"Greg S" wrote =in message news:ecBRlY7IGHA.1180@.TK2MSFTNGP09.phx.gbl...>I have a matrix where the =detail cells are set to navigate to a subreport. > However I *don't* want them =to provide navigation if they're in a subtotal > row or =column. I can't figure out what to call in order to determine > whether the =cell is a subtotal or not.> > Any ideas?> >

--=_NextPart_000_0049_01C625AB.01FC8700--|||This worked perfectly! Thanks.
"Kaisa M. Lindahl" <kaisaml@.hotmail.com> wrote in message
news:eWe1hKaJGHA.1832@.TK2MSFTNGP11.phx.gbl...
Try playing around with this formula:
=iif(InScope("ColumnGroup1"), iif(InScope("RowGroup1"), "In Cell", "In
Subtotal of RowGroup1"), iif(InScope("RowGroup1"), "In Subtotal of
ColumnGroup1", "In Subtotal of entire matrix"))
Paste it into your usual matrix cell, and change RowGroup1 to whatever your
row group is called etc.
Kaisa M: Lindahl
"Greg S" <gregslistacct@.hotmail.com> wrote in message
news:ecBRlY7IGHA.1180@.TK2MSFTNGP09.phx.gbl...
>I have a matrix where the detail cells are set to navigate to a subreport.
> However I *don't* want them to provide navigation if they're in a subtotal
> row or column. I can't figure out what to call in order to determine
> whether the cell is a subtotal or not.
> Any ideas?
>|||I am not familiar with the InScope function. You did not really use all
those words did you? For instance "in Subtotal of entire matrix" ' or did
you substitute names for your matrix in there. Like I said ... I am not
familiar with that function and I am trying to learn how to use it. This
seems like a very good example and I want to understand it correctly. Thanks.
"Greg S" wrote:
> This worked perfectly! Thanks.
>
> "Kaisa M. Lindahl" <kaisaml@.hotmail.com> wrote in message
> news:eWe1hKaJGHA.1832@.TK2MSFTNGP11.phx.gbl...
> Try playing around with this formula:
> =iif(InScope("ColumnGroup1"), iif(InScope("RowGroup1"), "In Cell", "In
> Subtotal of RowGroup1"), iif(InScope("RowGroup1"), "In Subtotal of
> ColumnGroup1", "In Subtotal of entire matrix"))
> Paste it into your usual matrix cell, and change RowGroup1 to whatever your
> row group is called etc.
> Kaisa M: Lindahl
>
> "Greg S" <gregslistacct@.hotmail.com> wrote in message
> news:ecBRlY7IGHA.1180@.TK2MSFTNGP09.phx.gbl...
> >I have a matrix where the detail cells are set to navigate to a subreport.
> > However I *don't* want them to provide navigation if they're in a subtotal
> > row or column. I can't figure out what to call in order to determine
> > whether the cell is a subtotal or not.
> >
> > Any ideas?
> >
> >
>|||The InScope function relates to the name of the scope, which can be a row
group name, a column group name, a matrix name or a dataset name.
If you have one ColumnGroup called thisColumnGroup, one RowGroup called
thisRowGroup and a Matrix called thisMatrix, the following code
=iif(InScope("ColumnGroup1"),
iif(InScope("RowGroup1"), "In Cell", "In Subtotal of RowGroup1"),
iif(InScope("RowGroup1"), "In Subtotal of ColumnGroup1", "In Subtotal of
entire matrix"))
would be translated to
=IIF(Inscope("thisColumnGroup"),
IIF(inScope("thisRowGroup"), "This is the text that will show up in cells in
thisColumnGroup", "This is the text that will show up in the subtotal of
thisRowGroup"),
IIF(InScope("thisRowGroup"), "This is the text that will show up in the
subtotal of thisColumnGroup",
"This is the text that shows up in the intersection between your row and
column groups"))
Create a matrix with a row group and a column group, change the names of
thisColumnGroup and thisRowGroup with the names of your groups, and put the
statement above in a detail cell, and see what shows up. :)
A more normal statement would be
=IIF(Inscope("thisColumnGroup"),
IIF(inScope("thisRowGroup"), Fields!Name.Value,
um(Fields!ColumnName.Value ),
IIF(InScope("thisRowGroup"), sum(Fields!ColumnName2.Value ,
"x"))
But the best thing is to try it out, the scopes are a bit abstract, it's
easier to understand if you try playing with it. (At least that's what I do.
:) )
Kaisa M. Lindahl Lervik
"MJT" <MJT@.discussions.microsoft.com> wrote in message
news:1901C919-A4EA-48D0-B8FE-56F059A8660F@.microsoft.com...
>I am not familiar with the InScope function. You did not really use all
> those words did you? For instance "in Subtotal of entire matrix" ' or
> did
> you substitute names for your matrix in there. Like I said ... I am not
> familiar with that function and I am trying to learn how to use it. This
> seems like a very good example and I want to understand it correctly.
> Thanks.
> "Greg S" wrote:
>> This worked perfectly! Thanks.
>>
>> "Kaisa M. Lindahl" <kaisaml@.hotmail.com> wrote in message
>> news:eWe1hKaJGHA.1832@.TK2MSFTNGP11.phx.gbl...
>> Try playing around with this formula:
>> =iif(InScope("ColumnGroup1"), iif(InScope("RowGroup1"), "In Cell", "In
>> Subtotal of RowGroup1"), iif(InScope("RowGroup1"), "In Subtotal of
>> ColumnGroup1", "In Subtotal of entire matrix"))
>> Paste it into your usual matrix cell, and change RowGroup1 to whatever
>> your
>> row group is called etc.
>> Kaisa M: Lindahl
>>
>> "Greg S" <gregslistacct@.hotmail.com> wrote in message
>> news:ecBRlY7IGHA.1180@.TK2MSFTNGP09.phx.gbl...
>> >I have a matrix where the detail cells are set to navigate to a
>> >subreport.
>> > However I *don't* want them to provide navigation if they're in a
>> > subtotal
>> > row or column. I can't figure out what to call in order to determine
>> > whether the cell is a subtotal or not.
>> >
>> > Any ideas?
>> >
>> >
>>|||Thanks for the great explanation Kaisa ... I will try playing around with it
using this example. I appreciate your help!
"Kaisa M. Lindahl Lervik" wrote:
> The InScope function relates to the name of the scope, which can be a row
> group name, a column group name, a matrix name or a dataset name.
> If you have one ColumnGroup called thisColumnGroup, one RowGroup called
> thisRowGroup and a Matrix called thisMatrix, the following code
> =iif(InScope("ColumnGroup1"),
> iif(InScope("RowGroup1"), "In Cell", "In Subtotal of RowGroup1"),
> iif(InScope("RowGroup1"), "In Subtotal of ColumnGroup1", "In Subtotal of
> entire matrix"))
> would be translated to
>
> =IIF(Inscope("thisColumnGroup"),
> IIF(inScope("thisRowGroup"), "This is the text that will show up in cells in
> thisColumnGroup", "This is the text that will show up in the subtotal of
> thisRowGroup"),
> IIF(InScope("thisRowGroup"), "This is the text that will show up in the
> subtotal of thisColumnGroup",
> "This is the text that shows up in the intersection between your row and
> column groups"))
> Create a matrix with a row group and a column group, change the names of
> thisColumnGroup and thisRowGroup with the names of your groups, and put the
> statement above in a detail cell, and see what shows up. :)
> A more normal statement would be
> =IIF(Inscope("thisColumnGroup"),
> IIF(inScope("thisRowGroup"), Fields!Name.Value,
> um(Fields!ColumnName.Value ),
> IIF(InScope("thisRowGroup"), sum(Fields!ColumnName2.Value ,
> "x"))
> But the best thing is to try it out, the scopes are a bit abstract, it's
> easier to understand if you try playing with it. (At least that's what I do.
> :) )
> Kaisa M. Lindahl Lervik
> "MJT" <MJT@.discussions.microsoft.com> wrote in message
> news:1901C919-A4EA-48D0-B8FE-56F059A8660F@.microsoft.com...
> >I am not familiar with the InScope function. You did not really use all
> > those words did you? For instance "in Subtotal of entire matrix" ' or
> > did
> > you substitute names for your matrix in there. Like I said ... I am not
> > familiar with that function and I am trying to learn how to use it. This
> > seems like a very good example and I want to understand it correctly.
> > Thanks.
> >
> > "Greg S" wrote:
> >
> >> This worked perfectly! Thanks.
> >>
> >>
> >> "Kaisa M. Lindahl" <kaisaml@.hotmail.com> wrote in message
> >> news:eWe1hKaJGHA.1832@.TK2MSFTNGP11.phx.gbl...
> >> Try playing around with this formula:
> >> =iif(InScope("ColumnGroup1"), iif(InScope("RowGroup1"), "In Cell", "In
> >> Subtotal of RowGroup1"), iif(InScope("RowGroup1"), "In Subtotal of
> >> ColumnGroup1", "In Subtotal of entire matrix"))
> >>
> >> Paste it into your usual matrix cell, and change RowGroup1 to whatever
> >> your
> >> row group is called etc.
> >>
> >> Kaisa M: Lindahl
> >>
> >>
> >> "Greg S" <gregslistacct@.hotmail.com> wrote in message
> >> news:ecBRlY7IGHA.1180@.TK2MSFTNGP09.phx.gbl...
> >> >I have a matrix where the detail cells are set to navigate to a
> >> >subreport.
> >> > However I *don't* want them to provide navigation if they're in a
> >> > subtotal
> >> > row or column. I can't figure out what to call in order to determine
> >> > whether the cell is a subtotal or not.
> >> >
> >> > Any ideas?
> >> >
> >> >
> >>
> >>
>
>sql

Friday, March 23, 2012

Matrix Totaling question

Is it possible to set the background color on the Total (Row and/or Column) of a Matrix. I'm talking the entire Row and/or column not just the cell that reads "Total". I would like to have my subtotal rows and columns to be gray.Yes, It is possible!
In the textbox that has the "Total", you'll see, in the right upermost corner, a "green flag"; click and in the properties window set the background color to gray.
-
Telmo Moreira

Matrix Subtotals/Cells

I've seen in a fex posts on this forum that it's at this moment not yet possible to create a dynamic matrix where for each cell i can calculate his row-percentage, his column-percentage. His total percentage can be done.

A way i could still do this is to create another matrix that only holds the totals, but how can i reference a cell-value of a matrix from another field ? (If this can be done).

KG.

Harry.

Another approch i'm trying is make some hardcoded fields for the total of each row and column. In this case it is possible as i know that there will always be 7 rows (1week) and 5 performances ...

When referencing a fields as =Sum(Fields("DW_" + CStr(Fields!CompD_DayOfFilmWeek.Value)).Value, "SdwOlap") i'm getting it right.

But when i place tis formula in a cell of a matrix i'm getting in every column the grand total and not the total for that row, although, in the row below i entered the formula ="DW_" + CStr(Fields!CompD_DayOfFilmWeek.Value), and there i'm nicely seeing DW_1 to DW_7 depending on the right row.

Strange behaviour that i can't explain .....

|||

In the grouping scope parameter of the aggregate, you are specifying a value, "SdwOlap". What is this refering to? Is this the name of the dataset or matrix? If it is, then this explains why the totals are actually grand totals and not just the totals for the row. The aggregate is aggregating the data of this field for the entire dataset. Try setting this to the scope of the row grouping, or omit it altogether.


Ian

sql

Matrix subtotals jump to subreport?

I have a complex issue. I have a matrix that has a cell that jumps the user to a subreport sending parameters. Well the report also has subtotals compliments of the matrix. Well those subtotals also jump to the subreport sending *first* parameters. I don't want the subtotals tojump anywhere! How do I disable navigation on the subtotal row? Crazy!

Have you found a solution to this? I am having the same problem.

Matrix SubTotals

The data cell contains '=iif( Fields!dt.Value <
#11/1/2004#,"*",Sum(Fields!MyValue.Value))' which is causing the subtotals
(row & column) to show an * whenever the row or column shows an *.
How do I get the subtotal to ignore the *'s and subtotal on just those cells
that contain a value.I discovered that the subtotals cell is using the Fields!dt.Value from the
first matrix column, and since the columns are sorted oldest dt to newest the
dt.Value is < the date indicated.
Can someone think of a way I can fix this other the changing the column order?
"Harolds" wrote:
> The data cell contains '=iif( Fields!dt.Value <
> #11/1/2004#,"*",Sum(Fields!MyValue.Value))' which is causing the subtotals
> (row & column) to show an * whenever the row or column shows an *.
> How do I get the subtotal to ignore the *'s and subtotal on just those cells
> that contain a value.|||I changed my iif to =iif(last(Fields!dt.Value)... and this fixed my problem.
"Harolds" wrote:
> The data cell contains '=iif( Fields!dt.Value <
> #11/1/2004#,"*",Sum(Fields!MyValue.Value))' which is causing the subtotals
> (row & column) to show an * whenever the row or column shows an *.
> How do I get the subtotal to ignore the *'s and subtotal on just those cells
> that contain a value.

Wednesday, March 21, 2012

matrix runningavalue

hi all,
i have a matrix within my report. the column's group has inside one cell
with a table with 4 groups. one of groups have an expresion with the
runningvalue function. the problem came when i've applicated a subtotal at
this column group.
to be more clear, my columns describe the year's month. when i use the
runningvalue and the subtotal, at the preview the first column (january)
gives me the right value, after that everything is wrong in that row.
it could be another functions alternative that may help me?
thank youthat runningvalue it's not much compatible with the matrix. because with or
without subtotal it doesn't work right. it is something i could put in its
place, with the same role?
thank you
"Mirela" wrote:
> hi all,
> i have a matrix within my report. the column's group has inside one cell
> with a table with 4 groups. one of groups have an expresion with the
> runningvalue function. the problem came when i've applicated a subtotal at
> this column group.
> to be more clear, my columns describe the year's month. when i use the
> runningvalue and the subtotal, at the preview the first column (january)
> gives me the right value, after that everything is wrong in that row.
> it could be another functions alternative that may help me?
> thank yousql

Matrix report not setting the pagewidth properly

Hi,
I have a matrix report that displays offices down the page and all the
days in a month across the page, with a subreport in each cell
displaying other data.
The problem i am having is when i load the page the first time it will
only display half the days, when i press refresh or change the zoom
level it correctly displays all the data.
I have tried setting the zoom level on the url and setting the actual
and interactive page size to A2 (594mm x 420mm) and it has made no
difference.
Any suggestions on how i can get this to display correctly?
Thanks
DarrynOn Mar 11, 9:49 pm, darryn.brya...@.gmail.com wrote:
> Hi,
> I have a matrix report that displays offices down the page and all the
> days in a month across the page, with a subreport in each cell
> displaying other data.
> The problem i am having is when i load the page the first time it will
> only display half the days, when i press refresh or change the zoom
> level it correctly displays all the data.
> I have tried setting the zoom level on the url and setting the actual
> and interactive page size to A2 (594mm x 420mm) and it has made no
> difference.
> Any suggestions on how i can get this to display correctly?
> Thanks
> Darryn
Usually, when including subreports in a table, etc of another report,
the format tends to be a little hard to control (at least, at the
granular level). If there is a way to avoid using the subreport(s) in
this way, I would suggest it. I would check the complexity of the
queries/stored procedures used for the subreports and maybe use the
Database Engine Tuning Advisor to improve the performance of the
queries/stored procedures. It seems like there might be a bottleneck
with the queries. Hope this helps.
Regards,
Enrique Martinez
Sr. SQL Server Developer

Matrix Report Headings?

How can one add headings to the Row fields in a Matrix report?
One is easy (you just add it to the top left cell), but what if you
have more than one field in the Row area?
Much appreciated!Graham, This is a relatively common issue with a fairly kludgy solution.
Try creating a rectangle outside of the matrix, place the appropriate
fields or textboxes within the rectangle, format it to suit your needs
then cut and paste the rectangle into the row cell in the matrix.
Rectangles are quite useful containers.
Chris
grahamiec wrote:
> How can one add headings to the Row fields in a Matrix report?
> One is easy (you just add it to the top left cell), but what if you
> have more than one field in the Row area?
> Much appreciated!|||This is a very useful Tip. Helped me on time. Thanks a lot.
"Chris McGuigan" wrote:
> Graham, This is a relatively common issue with a fairly kludgy solution.
> Try creating a rectangle outside of the matrix, place the appropriate
> fields or textboxes within the rectangle, format it to suit your needs
> then cut and paste the rectangle into the row cell in the matrix.
> Rectangles are quite useful containers.
> Chris
>
> grahamiec wrote:
> > How can one add headings to the Row fields in a Matrix report?
> >
> > One is easy (you just add it to the top left cell), but what if you
> > have more than one field in the Row area?
> >
> > Much appreciated!
>|||Giya,
Glad I could help.
Chris
Giya wrote:
> This is a very useful Tip. Helped me on time. Thanks a lot.
> "Chris McGuigan" wrote:
> > Graham, This is a relatively common issue with a fairly kludgy
> > solution.
> >
> > Try creating a rectangle outside of the matrix, place the
> > appropriate fields or textboxes within the rectangle, format it to
> > suit your needs then cut and paste the rectangle into the row cell
> > in the matrix.
> >
> > Rectangles are quite useful containers.
> >
> > Chris
> >
> >
> > grahamiec wrote:
> >
> > > How can one add headings to the Row fields in a Matrix report?
> > >
> > > One is easy (you just add it to the top left cell), but what if
> > > you have more than one field in the Row area?
> > >
> > > Much appreciated!
> >
> >

Monday, March 19, 2012

Matrix Report Background Color

I have the following applied as an expression to the background color
on a cell
=IIF( Sum(Fields!Percentile.Value, "RegionalSnaps") >= 10, "Yellow",
"White")
I only want the ones above 10% to be yellow, otherwise white.
Any ideas anyone on why the entire range of cells are yellow and not
just the one above 10%?Is percentile an integer or a float. If float test is >= .10
"duhaas@.gmail.com" wrote:
> I have the following applied as an expression to the background color
> on a cell
> =IIF( Sum(Fields!Percentile.Value, "RegionalSnaps") >= 10, "Yellow",
> "White")
> I only want the ones above 10% to be yellow, otherwise white.
> Any ideas anyone on why the entire range of cells are yellow and not
> just the one above 10%?
>|||here is the query being called:
SELECT s.babr, s.SicDescription, SUM(s.AccountMV) AS mv,
SUM(s.AccountMV) / q.ps AS Percentile
FROM SnapsRaw s INNER JOIN
(SELECT babr, SUM(accountmv) ps
FROM snapsraw
WHERE monthend = '08/01/2006'
GROUP BY babr) q ON q.babr = s.babr
WHERE s.MonthEnd = '08/01/2006'
GROUP BY s.Babr, s.SicDescription, q.ps, q.babr
percentile is the number being displayed, changing it to .10 didnt seem
to help
On Nov 10, 4:12 pm, William <Will...@.discussions.microsoft.com> wrote:
> Is percentile an integer or a float. If float test is >= .10
> "duh...@.gmail.com" wrote:
> > I have the following applied as an expression to the background color
> > on a cell
> > =IIF( Sum(Fields!Percentile.Value, "RegionalSnaps") >= 10, "Yellow",
> > "White")
> > I only want the ones above 10% to be yellow, otherwise white.
> > Any ideas anyone on why the entire range of cells are yellow and not
> > just the one above 10%?|||Unless AccountMV & q.ps are both integers, Percentile is a decimal number so
your test should use the decimal as in:
IIF( Sum(Fields!Percentile.Value, "RegionalSnaps") >= .10, "Yellow", "White")
"duhaas@.gmail.com" wrote:
> here is the query being called:
> SELECT s.babr, s.SicDescription, SUM(s.AccountMV) AS mv,
> SUM(s.AccountMV) / q.ps AS Percentile
> FROM SnapsRaw s INNER JOIN
> (SELECT babr, SUM(accountmv) ps
> FROM snapsraw
> WHERE monthend = '08/01/2006'
> GROUP BY babr) q ON q.babr = s.babr
> WHERE s.MonthEnd = '08/01/2006'
> GROUP BY s.Babr, s.SicDescription, q.ps, q.babr
> percentile is the number being displayed, changing it to .10 didnt seem
> to help
>
> On Nov 10, 4:12 pm, William <Will...@.discussions.microsoft.com> wrote:
> > Is percentile an integer or a float. If float test is >= .10
> >
> > "duh...@.gmail.com" wrote:
> > > I have the following applied as an expression to the background color
> > > on a cell
> >
> > > =IIF( Sum(Fields!Percentile.Value, "RegionalSnaps") >= 10, "Yellow",
> > > "White")
> >
> > > I only want the ones above 10% to be yellow, otherwise white.
> >
> > > Any ideas anyone on why the entire range of cells are yellow and not
> > > just the one above 10%?
>|||William
Appreciate all the help, I have made the change, and its still
highlighting the entire range of cells instead of just those above 10%,
here is the code for the report, its textbox2 that im playing with:
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<ReportItems>
<Matrix Name="matrix1">
<Corner>
<ReportItems>
<Textbox Name="textbox3">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<TextDecoration>Underline</TextDecoration>
<FontSize>7pt</FontSize>
<TextAlign>Left</TextAlign>
<Color>Blue</Color>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
<FontWeight>700</FontWeight>
</Style>
<ZIndex>3</ZIndex>
<rd:DefaultName>textbox3</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>SIC ID/ Industry</Value>
</Textbox>
</ReportItems>
</Corner>
<Style />
<MatrixRows>
<MatrixRow>
<MatrixCells>
<MatrixCell>
<ReportItems>
<Textbox Name="textbox2">
<Style>
<PaddingLeft>1pt</PaddingLeft>
<Format>g</Format>
<BackgroundColor>=IIF(Sum(Fields!Percentile.Value, "RegionalSnaps")
>= .10, "Yellow", "White")</BackgroundColor>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<FontSize>7pt</FontSize>
<TextAlign>Center</TextAlign>
<PaddingBottom>1pt</PaddingBottom>
<PaddingTop>1pt</PaddingTop>
<PaddingRight>1pt</PaddingRight>
</Style>
<rd:DefaultName>textbox2</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=sum(Fields!Percentile.Value)</Value>
</Textbox>
</ReportItems>
</MatrixCell>
</MatrixCells>
<Height>0.15in</Height>
</MatrixRow>
</MatrixRows>
<MatrixColumns>
<MatrixColumn>
<Width>0.625in</Width>
</MatrixColumn>
</MatrixColumns>
<DataSetName>RegionalSnaps</DataSetName>
<ColumnGroupings>
<ColumnGrouping>
<DynamicColumns>
<Grouping Name="matrix1_babr">
<GroupExpressions>
<GroupExpression>=Fields!babr.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Sorting>
<SortBy>
<SortExpression>=Fields!babr.Value</SortExpression>
<Direction>Ascending</Direction>
</SortBy>
</Sorting>
<ReportItems>
<Textbox Name="babr">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BorderWidth>
<Bottom>1pt</Bottom>
</BorderWidth>
<BorderColor>
<Bottom>Black</Bottom>
</BorderColor>
<BorderStyle>
<Bottom>Solid</Bottom>
</BorderStyle>
<FontSize>7pt</FontSize>
<TextAlign>Center</TextAlign>
<Color>Blue</Color>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
<FontWeight>700</FontWeight>
</Style>
<ZIndex>2</ZIndex>
<rd:DefaultName>babr</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!babr.Value</Value>
</Textbox>
</ReportItems>
</DynamicColumns>
<Height>0.15in</Height>
</ColumnGrouping>
</ColumnGroupings>
<Left>0.125in</Left>
<RowGroupings>
<RowGrouping>
<DynamicRows>
<Grouping Name="matrix1_SicDescription">
<GroupExpressions>
<GroupExpression>=Fields!SicDescription.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Sorting>
<SortBy>
<SortExpression>=Fields!SicDescription.Value</SortExpression>
<Direction>Ascending</Direction>
</SortBy>
</Sorting>
<ReportItems>
<Textbox Name="SicDescription">
<Style>
<PaddingLeft>1pt</PaddingLeft>
<BorderWidth>
<Right>1pt</Right>
</BorderWidth>
<BorderColor>
<Right>Black</Right>
</BorderColor>
<BorderStyle>
<Right>Solid</Right>
</BorderStyle>
<FontSize>7pt</FontSize>
<TextAlign>Left</TextAlign>
<PaddingBottom>1pt</PaddingBottom>
<PaddingTop>1pt</PaddingTop>
<PaddingRight>1pt</PaddingRight>
</Style>
<ZIndex>1</ZIndex>
<rd:DefaultName>SicDescription</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!SicDescription.Value</Value>
</Textbox>
</ReportItems>
</DynamicRows>
<Width>1.75in</Width>
</RowGrouping>
</RowGroupings>
</Matrix>
</ReportItems>
<Style />
<Height>0.3in</Height>
</Body>
<DataSources>
<DataSource Name="RegionalSnaps">
<rd:DataSourceID>74b2d458-9f2d-4e29-8375-2ed584778c1c</rd:DataSourceID>
<DataSourceReference>RegionalSnaps</DataSourceReference>
</DataSource>
</DataSources>
<Code />
<Width>2.5in</Width>
<DataSets>
<DataSet Name="RegionalSnaps">
<Fields>
<Field Name="babr">
<DataField>babr</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="SicDescription">
<DataField>SicDescription</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="mv">
<DataField>mv</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="Percentile">
<DataField>Percentile</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>RegionalSnaps</DataSourceName>
<CommandText>SELECT s.babr, s.SicDescription,
SUM(s.AccountMV) AS mv, SUM(s.AccountMV) / q.ps AS Percentile
FROM SnapsRaw s INNER JOIN
(SELECT babr, SUM(accountmv) ps
FROM snapsraw
WHERE monthend = '08/01/2006'
GROUP BY babr) q ON q.babr = s.babr
WHERE s.MonthEnd = '08/01/2006'
GROUP BY s.Babr, s.SicDescription, q.ps, q.babr</CommandText>
</Query>
</DataSet>
</DataSets>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>f4c1c559-ee3a-43cb-9c9d-27f23c7b8cc8</rd:ReportID>
<Language>en-US</Language>
</Report>
On Nov 15, 8:35 am, William <Will...@.discussions.microsoft.com> wrote:
> Unless AccountMV & q.ps are both integers, Percentile is a decimal number so
> your test should use the decimal as in:
> IIF( Sum(Fields!Percentile.Value, "RegionalSnaps") >= .10, "Yellow", "White")"duh...@.gmail.com" wrote:
> > here is the query being called:
> > SELECT s.babr, s.SicDescription, SUM(s.AccountMV) AS mv,
> > SUM(s.AccountMV) / q.ps AS Percentile
> > FROM SnapsRaw s INNER JOIN
> > (SELECT babr, SUM(accountmv) ps
> > FROM snapsraw
> > WHERE monthend = '08/01/2006'
> > GROUP BY babr) q ON q.babr = s.babr
> > WHERE s.MonthEnd = '08/01/2006'
> > GROUP BY s.Babr, s.SicDescription, q.ps, q.babr
> > percentile is the number being displayed, changing it to .10 didnt seem
> > to help
> > On Nov 10, 4:12 pm, William <Will...@.discussions.microsoft.com> wrote:
> > > Is percentile an integer or a float. If float test is >= .10
> > > "duh...@.gmail.com" wrote:
> > > > I have the following applied as an expression to the background color
> > > > on a cell
> > > > =IIF( Sum(Fields!Percentile.Value, "RegionalSnaps") >= 10, "Yellow",
> > > > "White")
> > > > I only want the ones above 10% to be yellow, otherwise white.
> > > > Any ideas anyone on why the entire range of cells are yellow and not
> > > > just the one above 10%?|||I took your IIF statement and applied it to a cell in a report I have and a
value of .111 came back with yellow background. So I would go back to the
format of the value coming in and verify that you have a number with decimals
coming in. Also verify the scope of the IIF test if you have multiple data
sources with the same field names.
"duhaas@.gmail.com" wrote:
> William
> Appreciate all the help, I have made the change, and its still
> highlighting the entire range of cells instead of just those above 10%,
> here is the code for the report, its textbox2 that im playing with:
> <?xml version="1.0" encoding="utf-8"?>
> <Report
> xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
> xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
> <Body>
> <ReportItems>
> <Matrix Name="matrix1">
> <Corner>
> <ReportItems>
> <Textbox Name="textbox3">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <TextDecoration>Underline</TextDecoration>
> <FontSize>7pt</FontSize>
> <TextAlign>Left</TextAlign>
> <Color>Blue</Color>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> <FontWeight>700</FontWeight>
> </Style>
> <ZIndex>3</ZIndex>
> <rd:DefaultName>textbox3</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>SIC ID/ Industry</Value>
> </Textbox>
> </ReportItems>
> </Corner>
> <Style />
> <MatrixRows>
> <MatrixRow>
> <MatrixCells>
> <MatrixCell>
> <ReportItems>
> <Textbox Name="textbox2">
> <Style>
> <PaddingLeft>1pt</PaddingLeft>
> <Format>g</Format>
> <BackgroundColor>=IIF(Sum(Fields!Percentile.Value, "RegionalSnaps")
> >= .10, "Yellow", "White")</BackgroundColor>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> <FontSize>7pt</FontSize>
> <TextAlign>Center</TextAlign>
> <PaddingBottom>1pt</PaddingBottom>
> <PaddingTop>1pt</PaddingTop>
> <PaddingRight>1pt</PaddingRight>
> </Style>
> <rd:DefaultName>textbox2</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>=sum(Fields!Percentile.Value)</Value>
> </Textbox>
> </ReportItems>
> </MatrixCell>
> </MatrixCells>
> <Height>0.15in</Height>
> </MatrixRow>
> </MatrixRows>
> <MatrixColumns>
> <MatrixColumn>
> <Width>0.625in</Width>
> </MatrixColumn>
> </MatrixColumns>
> <DataSetName>RegionalSnaps</DataSetName>
> <ColumnGroupings>
> <ColumnGrouping>
> <DynamicColumns>
> <Grouping Name="matrix1_babr">
> <GroupExpressions>
> <GroupExpression>=Fields!babr.Value</GroupExpression>
> </GroupExpressions>
> </Grouping>
> <Sorting>
> <SortBy>
> <SortExpression>=Fields!babr.Value</SortExpression>
> <Direction>Ascending</Direction>
> </SortBy>
> </Sorting>
> <ReportItems>
> <Textbox Name="babr">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BorderWidth>
> <Bottom>1pt</Bottom>
> </BorderWidth>
> <BorderColor>
> <Bottom>Black</Bottom>
> </BorderColor>
> <BorderStyle>
> <Bottom>Solid</Bottom>
> </BorderStyle>
> <FontSize>7pt</FontSize>
> <TextAlign>Center</TextAlign>
> <Color>Blue</Color>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> <FontWeight>700</FontWeight>
> </Style>
> <ZIndex>2</ZIndex>
> <rd:DefaultName>babr</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>=Fields!babr.Value</Value>
> </Textbox>
> </ReportItems>
> </DynamicColumns>
> <Height>0.15in</Height>
> </ColumnGrouping>
> </ColumnGroupings>
> <Left>0.125in</Left>
> <RowGroupings>
> <RowGrouping>
> <DynamicRows>
> <Grouping Name="matrix1_SicDescription">
> <GroupExpressions>
> <GroupExpression>=Fields!SicDescription.Value</GroupExpression>
> </GroupExpressions>
> </Grouping>
> <Sorting>
> <SortBy>
> <SortExpression>=Fields!SicDescription.Value</SortExpression>
> <Direction>Ascending</Direction>
> </SortBy>
> </Sorting>
> <ReportItems>
> <Textbox Name="SicDescription">
> <Style>
> <PaddingLeft>1pt</PaddingLeft>
> <BorderWidth>
> <Right>1pt</Right>
> </BorderWidth>
> <BorderColor>
> <Right>Black</Right>
> </BorderColor>
> <BorderStyle>
> <Right>Solid</Right>
> </BorderStyle>
> <FontSize>7pt</FontSize>
> <TextAlign>Left</TextAlign>
> <PaddingBottom>1pt</PaddingBottom>
> <PaddingTop>1pt</PaddingTop>
> <PaddingRight>1pt</PaddingRight>
> </Style>
> <ZIndex>1</ZIndex>
> <rd:DefaultName>SicDescription</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>=Fields!SicDescription.Value</Value>
> </Textbox>
> </ReportItems>
> </DynamicRows>
> <Width>1.75in</Width>
> </RowGrouping>
> </RowGroupings>
> </Matrix>
> </ReportItems>
> <Style />
> <Height>0.3in</Height>
> </Body>
> <DataSources>
> <DataSource Name="RegionalSnaps">
> <rd:DataSourceID>74b2d458-9f2d-4e29-8375-2ed584778c1c</rd:DataSourceID>
> <DataSourceReference>RegionalSnaps</DataSourceReference>
> </DataSource>
> </DataSources>
> <Code />
> <Width>2.5in</Width>
> <DataSets>
> <DataSet Name="RegionalSnaps">
> <Fields>
> <Field Name="babr">
> <DataField>babr</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="SicDescription">
> <DataField>SicDescription</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="mv">
> <DataField>mv</DataField>
> <rd:TypeName>System.Decimal</rd:TypeName>
> </Field>
> <Field Name="Percentile">
> <DataField>Percentile</DataField>
> <rd:TypeName>System.Decimal</rd:TypeName>
> </Field>
> </Fields>
> <Query>
> <DataSourceName>RegionalSnaps</DataSourceName>
> <CommandText>SELECT s.babr, s.SicDescription,
> SUM(s.AccountMV) AS mv, SUM(s.AccountMV) / q.ps AS Percentile
> FROM SnapsRaw s INNER JOIN
> (SELECT babr, SUM(accountmv) ps
> FROM snapsraw
> WHERE monthend = '08/01/2006'
> GROUP BY babr) q ON q.babr = s.babr
> WHERE s.MonthEnd = '08/01/2006'
> GROUP BY s.Babr, s.SicDescription, q.ps, q.babr</CommandText>
> </Query>
> </DataSet>
> </DataSets>
> <rd:SnapToGrid>true</rd:SnapToGrid>
> <rd:DrawGrid>true</rd:DrawGrid>
> <rd:ReportID>f4c1c559-ee3a-43cb-9c9d-27f23c7b8cc8</rd:ReportID>
> <Language>en-US</Language>
> </Report>
> On Nov 15, 8:35 am, William <Will...@.discussions.microsoft.com> wrote:
> > Unless AccountMV & q.ps are both integers, Percentile is a decimal number so
> > your test should use the decimal as in:
> >
> > IIF( Sum(Fields!Percentile.Value, "RegionalSnaps") >= .10, "Yellow", "White")"duh...@.gmail.com" wrote:
> > > here is the query being called:
> >
> > > SELECT s.babr, s.SicDescription, SUM(s.AccountMV) AS mv,
> > > SUM(s.AccountMV) / q.ps AS Percentile
> > > FROM SnapsRaw s INNER JOIN
> > > (SELECT babr, SUM(accountmv) ps
> > > FROM snapsraw
> > > WHERE monthend = '08/01/2006'
> > > GROUP BY babr) q ON q.babr = s.babr
> > > WHERE s.MonthEnd = '08/01/2006'
> > > GROUP BY s.Babr, s.SicDescription, q.ps, q.babr
> >
> > > percentile is the number being displayed, changing it to .10 didnt seem
> > > to help
> >
> > > On Nov 10, 4:12 pm, William <Will...@.discussions.microsoft.com> wrote:
> > > > Is percentile an integer or a float. If float test is >= .10
> >
> > > > "duh...@.gmail.com" wrote:
> > > > > I have the following applied as an expression to the background color
> > > > > on a cell
> >
> > > > > =IIF( Sum(Fields!Percentile.Value, "RegionalSnaps") >= 10, "Yellow",
> > > > > "White")
> >
> > > > > I only want the ones above 10% to be yellow, otherwise white.
> >
> > > > > Any ideas anyone on why the entire range of cells are yellow and not
> > > > > just the one above 10%?
>|||Thanks again for your feedback, in running the query standalone the
results appear like this:
STATE GROUP
MV PERCENT
KC Engineering & Management Services 336044936.72 0.0556
STL Wholesale Trade-Nondurable Goods 221851565.42 0.1078
The accountmv field is a datatype money, just dont understand what the
deal is.
On Nov 15, 9:15 am, William <Will...@.discussions.microsoft.com> wrote:
> I took your IIF statement and applied it to a cell in a report I have and a
> value of .111 came back with yellow background. So I would go back to the
> format of the value coming in and verify that you have a number with decimals
> coming in. Also verify the scope of the IIF test if you have multiple data
> sources with the same field names."duh...@.gmail.com" wrote:
> > William
> > Appreciate all the help, I have made the change, and its still
> > highlighting the entire range of cells instead of just those above 10%,
> > here is the code for the report, its textbox2 that im playing with:
> > <?xml version="1.0" encoding="utf-8"?>
> > <Report
> > xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefini..."
> > xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
> > <Body>
> > <ReportItems>
> > <Matrix Name="matrix1">
> > <Corner>
> > <ReportItems>
> > <Textbox Name="textbox3">
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <TextDecoration>Underline</TextDecoration>
> > <FontSize>7pt</FontSize>
> > <TextAlign>Left</TextAlign>
> > <Color>Blue</Color>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingTop>2pt</PaddingTop>
> > <PaddingRight>2pt</PaddingRight>
> > <FontWeight>700</FontWeight>
> > </Style>
> > <ZIndex>3</ZIndex>
> > <rd:DefaultName>textbox3</rd:DefaultName>
> > <CanGrow>true</CanGrow>
> > <Value>SIC ID/ Industry</Value>
> > </Textbox>
> > </ReportItems>
> > </Corner>
> > <Style />
> > <MatrixRows>
> > <MatrixRow>
> > <MatrixCells>
> > <MatrixCell>
> > <ReportItems>
> > <Textbox Name="textbox2">
> > <Style>
> > <PaddingLeft>1pt</PaddingLeft>
> > <Format>g</Format>
> > <BackgroundColor>=IIF(Sum(Fields!Percentile.Value, "RegionalSnaps")
> > >= .10, "Yellow", "White")</BackgroundColor>
> > <BorderStyle>
> > <Default>Solid</Default>
> > </BorderStyle>
> > <FontSize>7pt</FontSize>
> > <TextAlign>Center</TextAlign>
> > <PaddingBottom>1pt</PaddingBottom>
> > <PaddingTop>1pt</PaddingTop>
> > <PaddingRight>1pt</PaddingRight>
> > </Style>
> > <rd:DefaultName>textbox2</rd:DefaultName>
> > <CanGrow>true</CanGrow>
> > <Value>=sum(Fields!Percentile.Value)</Value>
> > </Textbox>
> > </ReportItems>
> > </MatrixCell>
> > </MatrixCells>
> > <Height>0.15in</Height>
> > </MatrixRow>
> > </MatrixRows>
> > <MatrixColumns>
> > <MatrixColumn>
> > <Width>0.625in</Width>
> > </MatrixColumn>
> > </MatrixColumns>
> > <DataSetName>RegionalSnaps</DataSetName>
> > <ColumnGroupings>
> > <ColumnGrouping>
> > <DynamicColumns>
> > <Grouping Name="matrix1_babr">
> > <GroupExpressions>
> > <GroupExpression>=Fields!babr.Value</GroupExpression>
> > </GroupExpressions>
> > </Grouping>
> > <Sorting>
> > <SortBy>
> > <SortExpression>=Fields!babr.Value</SortExpression>
> > <Direction>Ascending</Direction>
> > </SortBy>
> > </Sorting>
> > <ReportItems>
> > <Textbox Name="babr">
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <BorderWidth>
> > <Bottom>1pt</Bottom>
> > </BorderWidth>
> > <BorderColor>
> > <Bottom>Black</Bottom>
> > </BorderColor>
> > <BorderStyle>
> > <Bottom>Solid</Bottom>
> > </BorderStyle>
> > <FontSize>7pt</FontSize>
> > <TextAlign>Center</TextAlign>
> > <Color>Blue</Color>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingTop>2pt</PaddingTop>
> > <PaddingRight>2pt</PaddingRight>
> > <FontWeight>700</FontWeight>
> > </Style>
> > <ZIndex>2</ZIndex>
> > <rd:DefaultName>babr</rd:DefaultName>
> > <CanGrow>true</CanGrow>
> > <Value>=Fields!babr.Value</Value>
> > </Textbox>
> > </ReportItems>
> > </DynamicColumns>
> > <Height>0.15in</Height>
> > </ColumnGrouping>
> > </ColumnGroupings>
> > <Left>0.125in</Left>
> > <RowGroupings>
> > <RowGrouping>
> > <DynamicRows>
> > <Grouping Name="matrix1_SicDescription">
> > <GroupExpressions>
> > <GroupExpression>=Fields!SicDescription.Value</GroupExpression>
> > </GroupExpressions>
> > </Grouping>
> > <Sorting>
> > <SortBy>
> > <SortExpression>=Fields!SicDescription.Value</SortExpression>
> > <Direction>Ascending</Direction>
> > </SortBy>
> > </Sorting>
> > <ReportItems>
> > <Textbox Name="SicDescription">
> > <Style>
> > <PaddingLeft>1pt</PaddingLeft>
> > <BorderWidth>
> > <Right>1pt</Right>
> > </BorderWidth>
> > <BorderColor>
> > <Right>Black</Right>
> > </BorderColor>
> > <BorderStyle>
> > <Right>Solid</Right>
> > </BorderStyle>
> > <FontSize>7pt</FontSize>
> > <TextAlign>Left</TextAlign>
> > <PaddingBottom>1pt</PaddingBottom>
> > <PaddingTop>1pt</PaddingTop>
> > <PaddingRight>1pt</PaddingRight>
> > </Style>
> > <ZIndex>1</ZIndex>
> > <rd:DefaultName>SicDescription</rd:DefaultName>
> > <CanGrow>true</CanGrow>
> > <Value>=Fields!SicDescription.Value</Value>
> > </Textbox>
> > </ReportItems>
> > </DynamicRows>
> > <Width>1.75in</Width>
> > </RowGrouping>
> > </RowGroupings>
> > </Matrix>
> > </ReportItems>
> > <Style />
> > <Height>0.3in</Height>
> > </Body>
> > <DataSources>
> > <DataSource Name="RegionalSnaps">
> > <rd:DataSourceID>74b2d458-9f2d-4e29-8375-2ed584778c1c</rd:DataSourceID>
> > <DataSourceReference>RegionalSnaps</DataSourceReference>
> > </DataSource>
> > </DataSources>
> > <Code />
> > <Width>2.5in</Width>
> > <DataSets>
> > <DataSet Name="RegionalSnaps">
> > <Fields>
> > <Field Name="babr">
> > <DataField>babr</DataField>
> > <rd:TypeName>System.String</rd:TypeName>
> > </Field>
> > <Field Name="SicDescription">
> > <DataField>SicDescription</DataField>
> > <rd:TypeName>System.String</rd:TypeName>
> > </Field>
> > <Field Name="mv">
> > <DataField>mv</DataField>
> > <rd:TypeName>System.Decimal</rd:TypeName>
> > </Field>
> > <Field Name="Percentile">
> > <DataField>Percentile</DataField>
> > <rd:TypeName>System.Decimal</rd:TypeName>
> > </Field>
> > </Fields>
> > <Query>
> > <DataSourceName>RegionalSnaps</DataSourceName>
> > <CommandText>SELECT s.babr, s.SicDescription,
> > SUM(s.AccountMV) AS mv, SUM(s.AccountMV) / q.ps AS Percentile
> > FROM SnapsRaw s INNER JOIN
> > (SELECT babr, SUM(accountmv) ps
> > FROM snapsraw
> > WHERE monthend = '08/01/2006'
> > GROUP BY babr) q ON q.babr = s.babr
> > WHERE s.MonthEnd = '08/01/2006'
> > GROUP BY s.Babr, s.SicDescription, q.ps, q.babr</CommandText>
> > </Query>
> > </DataSet>
> > </DataSets>
> > <rd:SnapToGrid>true</rd:SnapToGrid>
> > <rd:DrawGrid>true</rd:DrawGrid>
> > <rd:ReportID>f4c1c559-ee3a-43cb-9c9d-27f23c7b8cc8</rd:ReportID>
> > <Language>en-US</Language>
> > </Report>
> > On Nov 15, 8:35 am, William <Will...@.discussions.microsoft.com> wrote:
> > > Unless AccountMV & q.ps are both integers, Percentile is a decimal number so
> > > your test should use the decimal as in:
> > > IIF( Sum(Fields!Percentile.Value, "RegionalSnaps") >= .10, "Yellow", "White")"duh...@.gmail.com" wrote:
> > > > here is the query being called:
> > > > SELECT s.babr, s.SicDescription, SUM(s.AccountMV) AS mv,
> > > > SUM(s.AccountMV) / q.ps AS Percentile
> > > > FROM SnapsRaw s INNER JOIN
> > > > (SELECT babr, SUM(accountmv) ps
> > > > FROM snapsraw
> > > > WHERE monthend = '08/01/2006'
> > > > GROUP BY babr) q ON q.babr = s.babr
> > > > WHERE s.MonthEnd = '08/01/2006'
> > > > GROUP BY s.Babr, s.SicDescription, q.ps, q.babr
> > > > percentile is the number being displayed, changing it to .10 didnt seem
> > > > to help
> > > > On Nov 10, 4:12 pm, William <Will...@.discussions.microsoft.com> wrote:
> > > > > Is percentile an integer or a float. If float test is >= .10
> > > > > "duh...@.gmail.com" wrote:
> > > > > > I have the following applied as an expression to the background color
> > > > > > on a cell
> > > > > > =IIF( Sum(Fields!Percentile.Value, "RegionalSnaps") >= 10, "Yellow",
> > > > > > "White")
> > > > > > I only want the ones above 10% to be yellow, otherwise white.
> > > > > > Any ideas anyone on why the entire range of cells are yellow and not
> > > > > > just the one above 10%?

Matrix Question

In a matrix with multiple groups on an axis, which has sub totals, how do
you determine in an expression where a particular data cell is?
For example:
----
| -2003 | +2004 |
Total |
----
| Q1 | Q2 | Q3 | Q4 | |
|
----
Item 1 | x1 | x2 | x3 | x4 | x5 |
x6 |
----
Item 2 | x7 | x8 | x9 | x10 | x11 |
x12 |
----
x1 = Item 1 for 2003-Q1
x2 = Item 1 for 2003-Q2
x3 = Item 1 for 2003-Q3
x4 = Item 1 for 2003-Q4
x5 = Item 1 for 2004
x6 = Item 1 for (2003 + 2004)
x7 = Item 2 for 2003-Q1
x8 = Item 2 for 2003-Q2
x9 = Item 2 for 2003-Q3
x10 = Item 2 for 2003-Q4
x11 = Item 2 for 2004
x12 = Item 2 for (2003 + 2004)
For instance:
At cell position x4, how do I know that I am in group 2 (Quarters), at cell
position x5, how do I know that I am in group 1 (years), and at cell
position x6, how do I know that I am in group 1 (years) sub total'Did you look at the InScope function? It will allow you to distinguish
between cells in subtotals and cells in the groupings. More information on
InScope is available at:
http://msdn.microsoft.com/library/en-us/RSCREATE/htm/rcr_creating_expressions_v1_0jmt.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Paul Allan" <paul_allan@.maxqtech.com> wrote in message
news:O%23pHpENnEHA.3172@.TK2MSFTNGP10.phx.gbl...
> In a matrix with multiple groups on an axis, which has sub totals, how do
> you determine in an expression where a particular data cell is?
> For example:
> ----
> | -2003 | +2004
|
> Total |
> ----
> | Q1 | Q2 | Q3 | Q4 | |
> |
> ----
> Item 1 | x1 | x2 | x3 | x4 | x5 |
> x6 |
> ----
> Item 2 | x7 | x8 | x9 | x10 | x11 |
> x12 |
> ----
> x1 = Item 1 for 2003-Q1
> x2 = Item 1 for 2003-Q2
> x3 = Item 1 for 2003-Q3
> x4 = Item 1 for 2003-Q4
> x5 = Item 1 for 2004
> x6 = Item 1 for (2003 + 2004)
> x7 = Item 2 for 2003-Q1
> x8 = Item 2 for 2003-Q2
> x9 = Item 2 for 2003-Q3
> x10 = Item 2 for 2003-Q4
> x11 = Item 2 for 2004
> x12 = Item 2 for (2003 + 2004)
> For instance:
> At cell position x4, how do I know that I am in group 2 (Quarters), at
cell
> position x5, how do I know that I am in group 1 (years), and at cell
> position x6, how do I know that I am in group 1 (years) sub total'
>

Monday, March 12, 2012

Matrix Fields for Subtotal

I had a matrix which retrieves value from a database.When i put "Fields!availability.Value" in the detail cell,it shows warning about aggregate.And i am using 'subtotal'.But my problem is when i use "Sum(Fields!availability.Value)",the value itself that was displayed is different from the actual value in the database.And when i use "First!availability.Value",the subtotal only get the first value from the above rows to which to get the subtotal.Uhm can there be anyway to solve this? Thanks in advance.

Hello,

Can you please explain what you mean by 'the value itself that was displayed is different from the actual value in the database'? Do you mean that the total shown does not equal the sum of the availability values shown in the matrix report? Can you provide an example?

Did you build your matrix using the wizard or directly? Have you tried the wizard? Play around with it for a little bit to get an understanding of the way SSRS matrix reports work.

Larry Smithmier

-

http://Smithmier.com/Blog

|||

I am using a manually created matrix.I had said that because the value is really different from what is retrieved from the database.Instead of 0.1, the value then becomes 0.9.And same as for the other value which also change.The total is equal to the sum of the availabilty, its fine,as long as the value is correct,which for me is not.What could have possibly be the reason why the values do change?

|||Ow..this issue was closed...hehe it was my fault,because it was in my subreport but when i run it actually on my main report it just works fine..It was caused by my parameters,wrong values were being passed..hehe..Thanks

Matrix Fields for Subtotal

I had a matrix which retrieves value from a database.When i put "Fields!availability.Value" in the detail cell,it shows warning about aggregate.And i am using 'subtotal'.But my problem is when i use "Sum(Fields!availability.Value)",the value itself that was displayed is different from the actual value in the database.And when i use "First!availability.Value",the subtotal only get the first value from the above rows to which to get the subtotal.Uhm can there be anyway to solve this? Thanks in advance.

Hello,

Can you please explain what you mean by 'the value itself that was displayed is different from the actual value in the database'? Do you mean that the total shown does not equal the sum of the availability values shown in the matrix report? Can you provide an example?

Did you build your matrix using the wizard or directly? Have you tried the wizard? Play around with it for a little bit to get an understanding of the way SSRS matrix reports work.

Larry Smithmier

-

http://Smithmier.com/Blog

|||

I am using a manually created matrix.I had said that because the value is really different from what is retrieved from the database.Instead of 0.1, the value then becomes 0.9.And same as for the other value which also change.The total is equal to the sum of the availabilty, its fine,as long as the value is correct,which for me is not.What could have possibly be the reason why the values do change?

|||Ow..this issue was closed...hehe it was my fault,because it was in my subreport but when i run it actually on my main report it just works fine..It was caused by my parameters,wrong values were being passed..hehe..Thanks

Matrix drill through problem

So here goes the explnation. The problem is specifying an all parameter in a drill through on the value cell of a matrix for the columns in the matrix that are not expanded.

Here goes the example

Matrix for sales.

Region | Shop | Number of sales. And then financial period would be at the top. Everything is collapsed on load so it looks something like this.

Region1 | | 50

Region2 | | 75

Then you expand Region.

Region1 | Shop1 | 30

Region1 | Shop2 | 20

Region2| | 75

At this point if you click on the 30 for shop 1 is drills through into another report passing parameter Region1, shop1 and financial period. This is perfect. The problem comes in that if you haven't expanded region1 and you click on the 50 it drills into the other report but passes through Shop1 as the shop parameter. How can I get this to pass though an all option for the unexpanded columns in the matrix. This is ofcourse just an example and my matrix has quite a few more column and stuff.

Please guys, any help would be appreciated.

This is Reporting services 2005 linking to SSAS2005 cube.

Thanks in advance

Hello,

Try this: http://msdn2.microsoft.com/en-us/library/ms156490.aspx

|||

Yeah.

iif(InScope("MatrixColumnGroup"), ParamaterIfTrue, ParameterIfFalse)

On interesting thing about this. Is that in BIDS the drillthrough doesn't work on the totals but it works on the report viewer control. I think this is a bug. If you drill through on a total it will take the first row grouping as the parameter but if you drill through from a front end using the report viewer control it works perfectly.

Good luck, thanks for the help.

Friday, March 9, 2012

Matrix Cell Height?

Is there any way to get the Reporting Server to preserve the height of a cell
in a matrix? Currently, i set CanGrow and CanShrink to false (because i've
already designed the matrix cells to fit the text). However, with these both
set to false, the height is automatically changed to about 50 pixels, and i
can't get it to not do that.
Anyone know how to do this? Please help.
--whitOn Apr 25, 9:50 am, Whitney Yiu <Whitney...@.discussions.microsoft.com>
wrote:
> Is there any way to get the Reporting Server to preserve the height of a cell
> in a matrix? Currently, i set CanGrow and CanShrink to false (because i've
> already designed the matrix cells to fit the text). However, with these both
> set to false, the height is automatically changed to about 50 pixels, and i
> can't get it to not do that.
> Anyone know how to do this? Please help.
> --whit
Check each cell of the matrix control and make sure that 'Can increase
to accommodate contents' and 'Can decrease to accommodate contents'
are not selected as part of the properties (Format tab). Hope this
helps.
Regards,
Enrique Martinez
Sr. Software Consultant

Wednesday, March 7, 2012

Matrix - How to calculate % of row?

Hi,

I wish to create a matrix with multiple rows in the main data cell and a subtotal at the end of the row. The first row in my matrix main cell is just a count of records, whereas the 2nd row is a % of the value in the 1st row compared to the total of that row. I have 5 columns in the matrix as below (ignore rounding issues):

Status

A

B

C

D

E

Total

01/01/2007

Number

9

32

3

13

0

57

% of Total

15%

56%

5%

24%

0.00%

100.00%

Can someone advise the best way to calculate the % cells in this example?

Thanks

Can you do it in the dataset query and then just set that row equal to the result of the query? That seems to work the best for me.|||

Hi,

Unfortunately in this instance I need to find a solution that can be implemented within the report.

Thanks for the reply

|||

Don't know if this is any use but whilst trying to find out how to add totals to my first matrix report (still looking...) I came across

http://blogs.technet.com/mat_stephen/archive/2005/05/26/405407.aspx

Steven

|||

The reply to the comment on Matt Stephen's blog certainly helps:

"For matrix reports though, percentages can be calculated on the total for the report, but not for group totals on the column total or row total, since the column or row group cannot be referenced within the dataset. "

Suggesting that it is not possible, so the data will have to be calculated at source.

Thanks Steven.

|||Or you could just use the workaround of calculating the total and percentages in the source query.|||

If ur using the concept of SSAS i.e. if ur datasource is an analysis services data base then i can help you out.

By using the calculate in SSAS

calculate a new column with some name as %of total and specify the expression as

(A/Total,Number) or (A/Total,Number.All) {I dont remember correctly)

Where in your case if A is the column name and

Total ur entire total

and the Number is the "row name"

What this thing does is, it extends the scope of the expression (A/Total) to the entire row so you get the correct value.

Hope this is ur requirement .

Thanks

|||

Thanks for the response Mr.rajz

I had to change the query at source as I was not using SSAS.

Matrices & Totals

I have a matrix with two levels of row grouping and one level of column
grouping. For each cell I need to show the percentage of the group subtotal.
Here's an example.
CG1 CG2 CG3
# % # % # %
RG1 RG11 50 50% 20 10% 400 20%
RG12 20 20% 80 40% 300 15%
RG13 30 30% 100 50% 1300 65%
Total 100 33% 200 40% 2000 12%
RG2 RG21 10 5% 50 17% 1000 7%
RG22 30 15% 60 20% 2000 13%
RG23 40 20% 70 23% 3000 20%
RG24 60 30% 80 27% 4000 27%
RG25 60 30% 40 13% 5000 33%
Total 200 67% 300 60% 15000 88%
Grand Total 300 100% 500 100% 17000 100%
I've stuck with formula to calculate %.
Please, help!
--
Thanks,
IDhi,
Its hard to get the total from the report .. I had the same problem. What I
did, I took the total of the each rowm from the Query itself and in the
report screen, in the % cell, I did
Fields!RG!.Value/Fields!Total.Value and put its format P2.
it was working fine with these expression.
try this...
Bismi
"exkievan" wrote:
> I have a matrix with two levels of row grouping and one level of column
> grouping. For each cell I need to show the percentage of the group subtotal.
> Here's an example.
>
> CG1 CG2 CG3
> # % # % # %
> RG1 RG11 50 50% 20 10% 400 20%
> RG12 20 20% 80 40% 300 15%
> RG13 30 30% 100 50% 1300 65%
> Total 100 33% 200 40% 2000 12%
> RG2 RG21 10 5% 50 17% 1000 7%
> RG22 30 15% 60 20% 2000 13%
> RG23 40 20% 70 23% 3000 20%
> RG24 60 30% 80 27% 4000 27%
> RG25 60 30% 40 13% 5000 33%
> Total 200 67% 300 60% 15000 88%
> Grand Total 300 100% 500 100% 17000 100%
> I've stuck with formula to calculate %.
> Please, help!
> --
> Thanks,
> ID|||Thanks, Bismi. I did it the same way. I thought there's a way to do it on the
report.
--
Thanks,
ID
"Bismi" wrote:
> hi,
> Its hard to get the total from the report .. I had the same problem. What I
> did, I took the total of the each rowm from the Query itself and in the
> report screen, in the % cell, I did
> Fields!RG!.Value/Fields!Total.Value and put its format P2.
> it was working fine with these expression.
> try this...
> Bismi
> "exkievan" wrote:
> > I have a matrix with two levels of row grouping and one level of column
> > grouping. For each cell I need to show the percentage of the group subtotal.
> >
> > Here's an example.
> >
> >
> > CG1 CG2 CG3
> > # % # % # %
> > RG1 RG11 50 50% 20 10% 400 20%
> > RG12 20 20% 80 40% 300 15%
> > RG13 30 30% 100 50% 1300 65%
> > Total 100 33% 200 40% 2000 12%
> > RG2 RG21 10 5% 50 17% 1000 7%
> > RG22 30 15% 60 20% 2000 13%
> > RG23 40 20% 70 23% 3000 20%
> > RG24 60 30% 80 27% 4000 27%
> > RG25 60 30% 40 13% 5000 33%
> > Total 200 67% 300 60% 15000 88%
> > Grand Total 300 100% 500 100% 17000 100%
> >
> > I've stuck with formula to calculate %.
> >
> > Please, help!
> > --
> > Thanks,
> >
> > ID