Showing posts with label profit. Show all posts
Showing posts with label profit. Show all posts

Friday, March 23, 2012

Matrix subtotal row question

I have created a matrix that looks like the following example:
APRIL MAY JUNE
PRODUCT X 10 20 30
PRODUCT Y 20 30 40
where the data is profit per unit sold (=PROFIT/# of UNITS)
I need to add a row that is the average profit for each month. I know
how to get the subtotal row to show up, but this justs adds the rows
(which is meaningless for me). Even the simple average (e.g. (10 +
20)/2) won't do - I need a weighted average per month (e.g. ALL PROFIT
for APRIL/ALL UNITS sold for APRIL). A data example is:
for April I sold 10 units of X for a $100 profit and I sold 20 units
of Y for a $400 profit
As in the table above, the profit per unit is (100/10) $10 for X and
(400/20) $20 for Y
But the average profit I want is not ($10 + $20) / 2 ($15). It is $500
profit / 30 units = ~$17
So two questions:
How do I add a average row to the matrix?
How do I make this a weighted average?
Sorry if my explanation is confusing or the answer is basic... new to
this and can't find an answer anywhere!It sounds like your current expression is something like this:
=Sum(Fields!ProfitPerUnit.Value)
What you really need is something more like this:
=Sum(Fields!TotalProfit.Value)/Sum(Fields!Units.Value)
If you are only returning ProfitPerUnit and Units in your query, you could
do this instead:
=Sum(Fields!ProfitPerUnit.Value*Fields!Units.Value)/Sum(Fields!Units.Value)
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"coldfact" <bryan@.coldfact.com> wrote in message
news:249185cd.0407151323.79162246@.posting.google.com...
> I have created a matrix that looks like the following example:
> APRIL MAY JUNE
> PRODUCT X 10 20 30
> PRODUCT Y 20 30 40
> where the data is profit per unit sold (=PROFIT/# of UNITS)
> I need to add a row that is the average profit for each month. I know
> how to get the subtotal row to show up, but this justs adds the rows
> (which is meaningless for me). Even the simple average (e.g. (10 +
> 20)/2) won't do - I need a weighted average per month (e.g. ALL PROFIT
> for APRIL/ALL UNITS sold for APRIL). A data example is:
> for April I sold 10 units of X for a $100 profit and I sold 20 units
> of Y for a $400 profit
> As in the table above, the profit per unit is (100/10) $10 for X and
> (400/20) $20 for Y
> But the average profit I want is not ($10 + $20) / 2 ($15). It is $500
> profit / 30 units = ~$17
> So two questions:
> How do I add a average row to the matrix?
> How do I make this a weighted average?
> Sorry if my explanation is confusing or the answer is basic... new to
> this and can't find an answer anywhere!|||Very nice - works now - thanks for your help!
"Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message news:<uONOoHsaEHA.1656@.TK2MSFTNGP09.phx.gbl>...
> It sounds like your current expression is something like this:
> =Sum(Fields!ProfitPerUnit.Value)
> What you really need is something more like this:
> =Sum(Fields!TotalProfit.Value)/Sum(Fields!Units.Value)
> If you are only returning ProfitPerUnit and Units in your query, you could
> do this instead:
> =Sum(Fields!ProfitPerUnit.Value*Fields!Units.Value)/Sum(Fields!Units.Value)
> --
> This post is provided 'AS IS' with no warranties, and confers no rights. All
> rights reserved. Some assembly required. Batteries not included. Your
> mileage may vary. Objects in mirror may be closer than they appear. No user
> serviceable parts inside. Opening cover voids warranty. Keep out of reach of
> children under 3.
> "coldfact" <bryan@.coldfact.com> wrote in message
> news:249185cd.0407151323.79162246@.posting.google.com...
> > I have created a matrix that looks like the following example:
> >
> > APRIL MAY JUNE
> > PRODUCT X 10 20 30
> > PRODUCT Y 20 30 40
> >
> > where the data is profit per unit sold (=PROFIT/# of UNITS)
> > I need to add a row that is the average profit for each month. I know
> > how to get the subtotal row to show up, but this justs adds the rows
> > (which is meaningless for me). Even the simple average (e.g. (10 +
> > 20)/2) won't do - I need a weighted average per month (e.g. ALL PROFIT
> > for APRIL/ALL UNITS sold for APRIL). A data example is:
> > for April I sold 10 units of X for a $100 profit and I sold 20 units
> > of Y for a $400 profit
> > As in the table above, the profit per unit is (100/10) $10 for X and
> > (400/20) $20 for Y
> > But the average profit I want is not ($10 + $20) / 2 ($15). It is $500
> > profit / 30 units = ~$17
> >
> > So two questions:
> > How do I add a average row to the matrix?
> > How do I make this a weighted average?
> >
> > Sorry if my explanation is confusing or the answer is basic... new to
> > this and can't find an answer anywhere!|||Very nice - works now - thanks for your help!
"Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message news:<uONOoHsaEHA.1656@.TK2MSFTNGP09.phx.gbl>...
> It sounds like your current expression is something like this:
> =Sum(Fields!ProfitPerUnit.Value)
> What you really need is something more like this:
> =Sum(Fields!TotalProfit.Value)/Sum(Fields!Units.Value)
> If you are only returning ProfitPerUnit and Units in your query, you could
> do this instead:
> =Sum(Fields!ProfitPerUnit.Value*Fields!Units.Value)/Sum(Fields!Units.Value)
> --
> This post is provided 'AS IS' with no warranties, and confers no rights. All
> rights reserved. Some assembly required. Batteries not included. Your
> mileage may vary. Objects in mirror may be closer than they appear. No user
> serviceable parts inside. Opening cover voids warranty. Keep out of reach of
> children under 3.
> "coldfact" <bryan@.coldfact.com> wrote in message
> news:249185cd.0407151323.79162246@.posting.google.com...
> > I have created a matrix that looks like the following example:
> >
> > APRIL MAY JUNE
> > PRODUCT X 10 20 30
> > PRODUCT Y 20 30 40
> >
> > where the data is profit per unit sold (=PROFIT/# of UNITS)
> > I need to add a row that is the average profit for each month. I know
> > how to get the subtotal row to show up, but this justs adds the rows
> > (which is meaningless for me). Even the simple average (e.g. (10 +
> > 20)/2) won't do - I need a weighted average per month (e.g. ALL PROFIT
> > for APRIL/ALL UNITS sold for APRIL). A data example is:
> > for April I sold 10 units of X for a $100 profit and I sold 20 units
> > of Y for a $400 profit
> > As in the table above, the profit per unit is (100/10) $10 for X and
> > (400/20) $20 for Y
> > But the average profit I want is not ($10 + $20) / 2 ($15). It is $500
> > profit / 30 units = ~$17
> >
> > So two questions:
> > How do I add a average row to the matrix?
> > How do I make this a weighted average?
> >
> > Sorry if my explanation is confusing or the answer is basic... new to
> > this and can't find an answer anywhere!

Wednesday, March 21, 2012

Matrix Report:Adding Average Column/Sorting based on last month/Conditional Formating

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

Sale Profit

Dealer 5/1/2007 6/1/2007 7/1/2007 5/1/2007 6/1/2007 7/1/2007

A 100 200 300 20 25 15

B 200 250 50 30 45 19

how can i do following 3 things

1)Add Total column for Sale and Average column for Profit

2)Sort report by lastMonth of Sale (here 7/1/2007) High to low

3)if last month of sale(here 7/1/2007) is less than second last month here (6/1/2007) whole row should be red

thanks

Abhijit Ramani wrote:

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

Sale Profit

Dealer 5/1/2007 6/1/2007 7/1/2007 5/1/2007 6/1/2007 7/1/2007

A 100 200 300 20 25 15

B 200 250 50 30 45 19

how can i do following 3 things

1)Add Total column for Sale and Average column for Profit

2)Sort report by lastMonth of Sale (here 7/1/2007) High to low

3)if last month of sale(here 7/1/2007) is less than second last month here (6/1/2007) whole row should be red

thanks

1) Since you want a total and an average, I would build this into your SQL statement. Buisness Intelligence Studio allows automatic summation, but you are asking for both.

In order for you to have a total and sale by month, you will most likely need to add a column in your table that is a Month Index. In other words, it is fairly difficult to get the average value of each month if you cannot uniquely identify the month.

2) Right click the column header for the month. Select properties then click the interactive sort tab. You want to check the "add an interactive sort to this textbox". Next, add the proper expression to sort by.

3) This may be a little tricky but to get you started: click the field which you want to change color. Click View -> properties window (if it isn't already open). In the color property, you want to put an expression.

Maybe something like this: =IIF(Fields!NextMonth.Value < Fields!PreviousMonth.Value,"Red", "Green")

sql

Friday, March 9, 2012

Matrix column drill down

I have a matrix with a row grouping of project and a column grouping of
project manager. I am summing the gross margin, labor cost, and gross
profit. Is there a way to only display the gross profit initially, but
supply a drill down on that field to display the sum of the other two fields
when the user clicks on the gross profit?This is what I have:
PM 1
PM2
Margin Labor Profit
Margin Labor Profit
+ Project 1
100 75 25
- Project 2 Foreman1 50 25 25
Foreman2 75 25 50
+ Project 3 10 15 -5
This is what I would like:
PM 1
PM2
Margin Labor Profit
Profit
+ Project 1
+ 25
- Project 2 Foreman1
50 25 25
Foreman2 75 25 50
+ Project 3 10 15 -5
"MikeS" wrote:
> I have a matrix with a row grouping of project and a column grouping of
> project manager. I am summing the gross margin, labor cost, and gross
> profit. Is there a way to only display the gross profit initially, but
> supply a drill down on that field to display the sum of the other two fields
> when the user clicks on the gross profit?|||The requirement is to see as much as possible on one page.
This is what I have:
PM 1
PM2 ...
Margin Labor Profit
Margin Labor Profit ...
+ Project 1
100 75 25 ...
- Project 2 Foreman1 50 25 25
Foreman2 75 25 50
+ Project 3 10 15 -5
This is what I would like:
PM 1
PM2 ...
Margin Labor Profit
Profit ...
+ Project 1
+ 25
- Project 2 Foreman1 - 25
50 25
Foreman2 - 50
75 25
+ Project 3 -5
Is it possible to do this? If so can someone please point me in the right
direction?
Thanks
"MikeS" wrote:
> I have a matrix with a row grouping of project and a column grouping of
> project manager. I am summing the gross margin, labor cost, and gross
> profit. Is there a way to only display the gross profit initially, but
> supply a drill down on that field to display the sum of the other two fields
> when the user clicks on the gross profit?