Showing posts with label jan. Show all posts
Showing posts with label jan. Show all posts

Sunday, February 19, 2012

Calculation in Matrix

My Matrix has the following structure
Item Jan Feb
--
AAA 200 40
How would I add another column to show the diff. between the two months
Item Jan Feb Diff
--
AAA 200 40 160
Thanks,
JRI don't think you can accomplish this currently with a matrix. As you know,
with a table it is easy but that fixes the number of displayed columns unlike
a matrix. Note that your question is similar to the one posted yesterday
about adding a partial subtotal to a matrix. There were no answers to that
question.
"John" wrote:
> My Matrix has the following structure
> Item Jan Feb
> --
> AAA 200 40
>
> How would I add another column to show the diff. between the two months
> Item Jan Feb Diff
> --
> AAA 200 40 160
>
> Thanks,
> JR|||Substraction is negative addition. Display Feb as 20 but treat it as -20 and
calculate the total.
CD
"B. Mark McKinney" <BMarkMcKinney@.discussions.microsoft.com> wrote in
message news:714B0E8B-B6C4-488B-9DE5-9DA23AD83E39@.microsoft.com...
>I don't think you can accomplish this currently with a matrix. As you know,
> with a table it is easy but that fixes the number of displayed columns
> unlike
> a matrix. Note that your question is similar to the one posted yesterday
> about adding a partial subtotal to a matrix. There were no answers to that
> question.
> "John" wrote:
>> My Matrix has the following structure
>> Item Jan Feb
>> --
>> AAA 200 40
>>
>> How would I add another column to show the diff. between the two months
>> Item Jan Feb Diff
>> --
>> AAA 200 40 160
>>
>> Thanks,
>> JR

Thursday, February 16, 2012

Calculating time elapsed (weekdays only)

What is the best way to calculate time elapssed between two dates and factor
in wdays only (exclude Saturday and Sunday).
Example:
Friday Jan 28th at 10pm thru Monday Jan 31st at 2am should calculate to 4
hours.
Friday Jan 21st at 10pm thru Monday Jan 31st at 2am should calculate to 124
hours
Thanks in advance,
MarkOn Mon, 31 Jan 2005 15:56:42 -0500, Mark Andrews wrote:

>What is the best way to calculate time elapssed between two dates and facto
r
>in wdays only (exclude Saturday and Sunday).
>Example:
>Friday Jan 28th at 10pm thru Monday Jan 31st at 2am should calculate to 4
>hours.
>Friday Jan 21st at 10pm thru Monday Jan 31st at 2am should calculate to 124
>hours
>Thanks in advance,
>Mark
>
Hi Mark,
Use DATEDIFF to find the total number of hours between the two dates.
Use a calendar table to find the number of non-workdays between the two
dates, multiply by 24 and subtract.
Why should I consider using an auxiliary calendar table? www.aspfaq.2519
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||See if this helps:
How do I count the number of business days between two dates?
http://www.aspfaq.com/show.asp?id=2453
Why should I consider using an auxiliary calendar table?
http://www.aspfaq.com/show.asp?id=2519
AMB
"Mark Andrews" wrote:

> What is the best way to calculate time elapssed between two dates and fact
or
> in wdays only (exclude Saturday and Sunday).
> Example:
> Friday Jan 28th at 10pm thru Monday Jan 31st at 2am should calculate to 4
> hours.
> Friday Jan 21st at 10pm thru Monday Jan 31st at 2am should calculate to 12
4
> hours
> Thanks in advance,
> Mark
>
>

Tuesday, February 14, 2012

Calculating last non empty of measures that are not included in a month

Hi!

I have two tables.

One is measures like this

Product Measure Date

Prod A 10 12, Jan 2006

Prod A 15 20, Jan 2006

Prod A 11 5, Mar 2006

The other is time dimension

When I create a cube, I would like to see by months last value of measure.

So in Feb I should get 15.

My question is - should I create a query and run it on server to

1. Find which months are not icluded in measuers

2. Then find last value for each product

3. Write into new table measures, where February will have last non empty value from January?

Or can I do it cube in some way?

The best way to solve this in AS2005 is to define measure aggregation function as LastNonEmpty - it will do exactly what you need.