Calculated Measures totals and subtotals.

Discussion forum for PivotCube VCL users. Common questions. Bug and problem reports

Moderator: Alex Zencovich

Calculated Measures totals and subtotals.

Postby bobibp » Thu Feb 10, 2011 9:25 am

Hi

We have a little problem in the calculation method of totals and subtotals of calculated measures. At present they are being calculated by the formula set in the calculated measure in compliance with the corresponding totals. We want these totals and subtotals to be calculated in the regular way - as sums of their subelements. Is it possible?
Have a nice day!
bobibp
User
 
Posts: 15
Joined: Sat Jan 10, 2009 7:43 am

Re: Calculated Measures totals and subtotals.

Postby AlexZencovich » Fri Feb 11, 2011 10:51 am

No. All cells calulated by single formula. You asked for different formula for different cells. You may do that by setting event handler to OnGetCellValue event.

If you need to get sum of values above - try to get RunningTotalByColumn/Row value instead of just Value. RT calulated as sum of subcells.
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am

Re: Calculated Measures totals and subtotals.

Postby snoopy_spy » Thu Aug 23, 2012 11:14 am

Hello

I need this too, i don't know how to handle this

i have a simple Calculation

Code: Select all
Result := "NETTO"+10


to add to every record for example 10
the result now is

Code: Select all
NETTO CALC
Customer1 5         15
Customer2 7         17
Customer3 9         19
Sum           21       31


how can i handle this?
snoopy_spy
User
 
Posts: 7
Joined: Wed Dec 02, 2009 10:55 am

Re: Calculated Measures totals and subtotals.

Postby AlexZencovich » Thu Aug 23, 2012 1:22 pm

snoopy_spy wrote:Hello

I need this too, i don't know how to handle this

i have a simple Calculation

Code: Select all
Result := "NETTO"+10


to add to every record for example 10
the result now is

Code: Select all
NETTO CALC
Customer1 5         15
Customer2 7         17
Customer3 9         19
Sum           21       31


how can i handle this?


I can only suggest to perform a custom function which will return a number of nested rows (func cnt();)
and use it like
Result = Value + Cnt()*10;
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am

Re: Calculated Measures totals and subtotals.

Postby snoopy_spy » Thu Aug 23, 2012 2:36 pm

Ok it was just an example
but in this simple example, i get problems with this function or?

Is there no other possibility to get the sum working?

we have for example a function

Result := MAX("NETTO1"-"NETTO2", 0)

MAX is a customer function

i don't know how i can make it that our customer is satisfied ... :(
snoopy_spy
User
 
Posts: 7
Joined: Wed Dec 02, 2009 10:55 am


Return to PivotCube VCL

Who is online

Users browsing this forum: No registered users and 0 guests

cron