|
META TOPICPARENT |
name="TWikiVariables" |
|
|
< < | CALC{"formula"} -- add spreadsheet calculations to tables and outside tables
- The
%CALC{"formula"}% variable is handled by the SpreadSheetPlugin. There are around 80 formulae, such as $ABS() , $EXACT() , $EXISTS() , $GET()/$SET() , $IF() , $LOG() , $LOWER() , $PERCENTILE() , $TIME() , $VALUE() .
- Syntax:
%CALC{"formula"}%
|
> > | CALC{"formula"} -- add spreadsheet calculations to tables
- The
%CALC{formula}% variable is handled by the SpreadSheetPlugin. Around 100 functions are available, such as $ABS() , $EXACT() , $EXISTS() , $GET()/$SET() , $IF() , $LOG() , $LOWER() , $PERCENTILE() , $TIME() , $VALUE() .
- Syntax:
%CALC{formula}%
|
| |
|
< < |
-
-
%CALC{"$SUM($ABOVE())"}% returns the sum of all cells above the current cell
-
%CALC{"$EXISTS(Web.SomeTopic)"}% returns 1 if the topic exists
-
%CALC{"$UPPER(Collaboration)"}% returns COLLABORATION
- Related: IF, IfStatements, SpreadSheetPlugin
|
> > |
-
-
%CALC{$SUM($ABOVE())}% returns the sum of all cells above the current cell
-
%CALC{$EXISTS(Web.SomeTopic)}% returns 1 if the topic exists
-
%CALC{$UPPER(Collaboration)}% returns COLLABORATION
- Note: The CALC variable is handled with delay compared to other TWiki variables. You may get unexpected results if you nest CALC inside other variables (such as
%INCLUDE{%CALC{...}%}% ) because it does not get evaluated inside-out & left-to-right like ordinary TWiki variables. Use CALCULATE if you nest variables.
- Related: CALCULATE, IF, IfStatements, SpreadSheetPlugin
|