Formula help

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

Moderator: Alex Zencovich

Formula help

Postby claudio » Wed Mar 23, 2011 1:38 pm

Hi Alex,

Please I need your help, I have the following problem, I have a customer with field time in minutes, sample 479 minutes show in cell 7,59 in the excel the formula =INT(A1/60)+(A1-INT(A1/60)*60) /100, but I don't found function like Int or Round in pivotcube.

begin
VAR A;
VAR HORA;
VAR MINUTO;
A = "COUNT";
HORA = INT(A / 60); <- I need convert this division for integer
MINUTO = (A - HORA * 60) / 100;
Result = HORA + MINUTO;
end

thanks,
Cláudio.
claudio
Guest
 
Posts: 2
Joined: Fri Jun 29, 2007 6:22 pm

Re: Formula help

Postby AlexZencovich » Fri Mar 25, 2011 10:56 am

You may use FUNC keyword to create ofw function in your delphi code via event handler OnCalcMeasureGetFunction(), you will need just add functiond eclaration in formula like

func INT;

Reslt = INT(some code here)

it will call event handler, with function name as parameter.
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


Return to PivotCube VCL

Who is online

Users browsing this forum: No registered users and 9 guests

cron