Showing posts with label series. Show all posts
Showing posts with label series. Show all posts

Tuesday, March 20, 2012

calculate running total field?

Hi,

I'm using the CR v 11 and I did a 3D bar chart that showing two series of data for each salesman , one is their outstanding orders and the other one is the closed orders.

Both bars are get the value from two running totals that I defined in the report by a distrinct count on salesman name.

For example for salesman_A , the bars are showing like

15 outstanding orders
70 closed orders

Now I want to show the percentage for the outstanding and closed orders. How can I do it?

Based on the example above.

The calculation is 15 / (15 +70) * 100 = 17.64%

Any suggetion? ideally can put that percentage on the report somewhere or as another data series on x aixes.

Thank you!I think I understand your question,

I would create a formula 'f_percent' -(under formula fields in the field explorer)

then define it as....

({TABLE_NAME.OUTSTANDING_ORDERS}/({TABLE_NAME.OUTSTANDING_ORDERS}+{TABLE_NAME.CLOSED_ORDERS})*100)|||I think I understand your question,

I would create a formula 'f_percent' -(under formula fields in the field explorer)

then define it as....

({TABLE_NAME.OUTSTANDING_ORDERS}/({TABLE_NAME.OUTSTANDING_ORDERS}+{TABLE_NAME.CLOSED_ORDERS})*100)

Thank you for your reply, but the problem is those two values (# of outstanding, closed orders) are not part of the table fileds, it is two running total that I defined and calculate at runtime.

But now I need to get the value of those two running totals in order to calcuate the percentage between the outstanding/closed orders.

Any idea?sql

Calculate integral of time series

Hello,
I want to compute an integral of values in a table that has 2 columns:
Column A: Time-stamp (T)
Column B: value (KWH)
I need to compute the sum of (KWH*(T(n)-T(n-1)))
Could you suggest a way to do it in T-SQL?
thanks
AmiAmi Einav wrote:
>I need to compute the sum of (KWH*(T(n)-T(n-1)))
Ad an autoincrementing id to your Table named idTbl
Assuming Tbl as Your Tablename
SELECT Tbl.T, Tbl2.T, Tbl.KWH , Tbl.KWH*(Tbl.T-Tbl2.T) as KWHt
FROM Tbl
INNER JOIN Tbl as Tbl2 on Tbl2.idTbl+1 = Tbl.idTbl
Maybe you a datetime - conversion to get the calculation work.
in the step Goup/Sum it together as you like
greetings,
J.C.|||Thanks Joe - that's exactly what I was looking for.
Ami
"Joe Care" <u18810@.uwe> wrote in message news:5c0163d5b2f02@.uwe...
> Ami Einav wrote:
> Ad an autoincrementing id to your Table named idTbl
> Assuming Tbl as Your Tablename
> SELECT Tbl.T, Tbl2.T, Tbl.KWH , Tbl.KWH*(Tbl.T-Tbl2.T) as KWHt
> FROM Tbl
> INNER JOIN Tbl as Tbl2 on Tbl2.idTbl+1 = Tbl.idTbl
> Maybe you a datetime - conversion to get the calculation work.
> in the step Goup/Sum it together as you like
> greetings,
> J.C.sql

Thursday, March 8, 2012

Caching in TimeSeries

Hi,

I have prepared a time series model. The model works well with few cases. Answering time raises extremly after processing the model with all cases.

In a book I read sth. about a cahing possibilty. But how can this be defined in Visual Studio ?

Thanks in advance
Achim

Since the time series algorithm does not do predictions on new input data (it uses the historical data that the model was trained with), it returns the same result each time you request a prediction for the next N steps, for a given N. You can take advantage of this by getting the results for the maximum number of steps you're likely to request in one query, saving the results on the client (in an in-memory list or on disk) and then using the saved results for future requests against that model instead of sending the prediction query to the server. You would only need to refresh the cached results if the model gets reprocessed with new data.|||

The algorithm has a certain built in mechanism for caching. For instance, if you ask for the next 50 forecasted values, the first query will be relatively slow. Subsequent queries for less than 50 values should be much faster. However, asking for the first time for 51 values will also take a longer time.