Framework:Expression Uses in CoPlanner: Difference between revisions

From CoPlanner 11
Jump to navigationJump to search
Created page with "(In Arbeit) Ausdrücke werden innerhalb von CoPlanner verwendet, um Werte in CoPlanner Würfel, [[:Kategorie:Masken|Maske..."
 
No edit summary
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
(In Arbeit)
Expressions are used throughout CoPlanner to specify or calculate values in [[Framework:BI_Center:Create_CoPlanner_Cube|CoPlanner Cubes]] or [[:Category:Masks|masks]]. This topic provides examples of the many places you can use expressions to vary the content or appearance of a CoPlanner Cube or a mask. This list is not comprehensive. You can set an expression for any property in a Formula Editor that displays the button [[image:Icon_Dateiauswahl.jpg]] or in a drop-down list that displays <Expression...>.


Ausdrücke werden innerhalb von CoPlanner verwendet, um Werte in [[Framework:BI_Center:CoPlanner_W%C3%BCrfel_erstellen|CoPlanner Würfel]], [[:Kategorie:Masken|Masken und Sichten]] mittels dem Dialogfeld "[[Framework:BI_Center:Formeleditor|Formeleditor]]" anzugeben oder zu berechnen. Dieses Hilfethema enthält Beispiele für die vielen Anwendungsmöglichkeiten, die Ausdrücke bieten, um den Inhalt oder die Darstellung einer Maske oder eines CoPlanner Würfels zu variieren. Es handelt sich dabei aber nicht um eine vollständige Liste. Sie können für jede Eigenschaft einen Ausdruck in einem Dialogfeld festlegen, in dem die Ausdrucksschaltfläche [[image:Icon_Dateiauswahl.jpg]] angezeigt wird, oder in einer Dropdownliste, in der <Expression...> angezeigt wird.
==Using Expressions==
 
Expressions can contain measures, dimension attributes, application properties, session variables, macros, imports, operators, and function calls. To see or change the expression text, you must open the [[Framework:BI_Center:Formula_Editor|Formula Editior]] or type directly in the Properties pane. The following table lists typical ways you can use an expression to display or organize data. You can type an expression directly into a dialog box or in the Properties pane.
==Syntax von Ausdrücken==
Ausdrücke können mehrere Measures, Dimensionsattribute, Funktionen, Anwendungseigenschaften, Sessionvariable, Makros und Importe enthalten. Um den Ausdruckstext anzuzeigen oder zu ändern, müssen Sie das Dialogfeld "[[Framework:BI_Center:Formeleditor|Formeleditor]]" öffnen oder direkt im Bereich Eigenschaften eine Eingabe vornehmen. In der folgenden Tabelle ist aufgeführt, auf welche Weise Sie einen Ausdruck verwenden können, um Daten anzuzeigen oder zu berechnen. Dazu zählen auch die festzulegende Eigenschaft, das normalerweise zum Festlegen verwendete Dialogfeld und der Wert der Eigenschaft. Sie können einen Ausdruck direkt in ein Dialogfeld oder im Bereich Eigenschaften eingeben.  


{| class="wikitable"  
{| class="wikitable"  
|- {{Tabellentitel}}
|- {{Tabellentitel}}
| width="33%" |Funktionalität
| width="33%" |Functionality
| width="33%" |Eigenschaft, Kontext und Objekt
| width="33%" |Property, Context, and Object
| width="34%" |Beispiel
| width="34%" |Example
|-
|-
| Verketten einer Zeichenfolge und einer Zeitfunktion, die von der aktuellen Zeit 12 Monate abzieht und entsprechend der Zeit formatiert ist.
| Concatenate text and period function, which reduces the actual date by 12 months and the result is formatted by the given date format.
| '''Caption''' oder '''Tooltip'''-Eigenschaft eines Measures in einer [[Framework:BI_Center:Eingabemaske_erstellen|Eingabemaske]] oder [[Framework:BI_Center:Zeilensicht_erstellen|Zeilensicht]].
| '''Caption''' or '''Tooltip'''-Property of a measure in an [[Framework:BI_Center:Create_Input_Mask|input mask]] or [[Framework:BI_Center:Create_Row_View|row view]].
| <span {{CoPFormel}}>'Menge Ist ' + 'TimeDimAdd(M,-12,[Zeit.ID],IIF('TimeDimFlag([Zeit.ID])'='Y','yyyy','MMM yy'))'</span>
| <span {{CoPFormel}}>'Quantity act. ' + 'TimeDimAdd(M,-12,[Period.ID],IIF('TimeDimFlag([Period.ID])'='Y','yyyy','MMM yy'))'</span>
|-
|-
| Verketten einer Dimensionselementbezeichnung und einer Zeitfunktion, die entsprechten der Zeit formatiert ist.
| Concatenate caption of a dimension element and period function and the result is formatted by the given date format.
| '''Caption''' oder '''Tooltip'''-Eigenschaft eines Measures in einer [[Framework:BI_Center:Eingabemaske_erstellen|Eingabemaske]] oder [[Framework:BI_Center:Zeilensicht_erstellen|Zeilensicht]].
| '''Caption''' or '''Tooltip'''-Property of a measure in an [[Framework:BI_Center:Create_Input_Mask|input mask]] or [[Framework:BI_Center:Create_Row_View|row view]].
| <span {{CoPFormel}}>'[Sub_GuVGKV.Name]' + ' - TimeDimAdd(M,0,[Zeit.ID],IIF('TimeDimFlag([Zeit.ID])'='Y','yyyy','MMMM yyyy'))'</span>
| <span {{CoPFormel}}>'[Sub_GuVGKV.Name]' + ' - TimeDimAdd(M,0,[Period.ID],IIF('TimeDimFlag([Period.ID])'='Y','yyyy','MMMM yyyy'))'</span>
|-
|-
| Sperren einer Zelle eines Measuers wenn ein anderes Measure (Preis) null ist und das Dimensionselement ein Leafelement ist.
| Lock a cell of a measure if an other measure (Price) is cero and the dimension element is a leaf element.
| '''LockCondition''' eines Measures in einer [[Framework:BI_Center:Eingabemaske_erstellen|Eingabemaske]] oder [[Framework:BI_Center:Zeilensicht_erstellen|Zeilensicht]].
| '''LockCondition'''-Property of a measure in an [[Framework:BI_Center:Create_Input_Mask|input mask]] or [[Framework:BI_Center:Create_Row_View|row view]].
| <span {{CoPFormel}}>([Preis]=0 and [Produkte.ChildCount]=0) or ([Produkte.ChildCount]>0)</span>
| <span {{CoPFormel}}>([Price]=0 and [Products.ChildCount]=0) or ([Products.ChildCount]>0)</span>
|-
|-
| Einschränken eines Filters. Dargestellt werden nur jene Produkte, die der ausgewählten Produktgruppe zugeordnet sind.  
| Restrict a filter. Only the products will be shown, assigned the selected product group.  
| '''SpecialDefinition''' einer Dimension als Filter in einer [[Framework:BI_Center:Eingabemaske_erstellen|Eingabemaske]] oder [[Framework:BI_Center:Zeilensicht_erstellen|Zeilensicht]].
| '''SpecialDefinition'''-Property of a dimension used as filter in an [[Framework:BI_Center:Create_Input_Mask|input mask]] or [[Framework:BI_Center:Create_Row_View|row view]].
| <span {{CoPFormel}}>AttributFilter(Produktgruppen,me_under,[Produktgruppen.ID])</span>
| <span {{CoPFormel}}>AttributFilter(Product groups,me_under,[Product groups.ID])</span>
|-
|-
| Plausibilitätsprüfung: Es darf nur ein Wert eingegehen werden, wenn bereits ein Preis vorhanden ist und der eingegebene Betrag positiv und größer oder gleich Null ist.
| Plausibility check: It should be only allowed to enter a quantity, if a price exists and it is a leaf element. Furthermore only positive quantities are allowed.
| '''DataValidation'''-Eigenschaft eines Measures in einer [[Framework:BI_Center:Eingabemaske_erstellen|Eingabemaske]] oder [[Framework:BI_Center:Zeilensicht_erstellen|Zeilensicht]]. Dialogfeld '''[[Framework:BI_Center:Eingabepr%C3%BCfung|Eingabeprüfung]]''' im Feld '''Ausdruck'''.
| '''DataValidation'''-Property of a measure in an [[Framework:BI_Center:Create_Input_Mask|input mask]] or [[Framework:BI_Center:Create_Row_View|row view]]. Dialog box '''[[Framework:BI_Center:Plausibility_Check|Plausibility Check]]''' in the field '''Settings'''.
| <span {{CoPFormel}}>[Preis]<>0 and <value>>=0</span>
| <span {{CoPFormel}}>[Price]<>0 and <value>>=0</span>
|-
|-
| Formatieren einer Schriftfarbe in Abhängigkeit seiner Größe.
| Format font color depending on value.
| '''ConditionalStyles'''-Eigenschaft einer [[Framework:BI_Center:Eingabemaske_erstellen|Eingabemaske]] oder [[Framework:BI_Center:Zeilensicht_erstellen|Zeilensicht]]. Dialogfeld '''[[Framework:BI-Center:Bedingte_Formatierung|Formatierungsassistent]]''', Bedingungen festlegen im Feld '''Bedingung'''.
| '''ConditionalStyles'''-Property in an [[Framework:BI_Center:Create_Input_Mask|input mask]] or [[Framework:BI_Center:Create_Row_View|row view]]. Dialog box '''[[Framework:BI-Center:Conditional_Formatting|Conditional Formatting Wizard]]''', define condition in field '''Condition'''.
| <span {{CoPFormel}}>[Umsatz]>=1000000</span>
| <span {{CoPFormel}}>[Sales]>=1000000</span>
|-
|-
| Berechnung des gewichtenten Preises.  
| Calculate weighted price.  
| '''Expression''' und '''CalcBackExpression'''-Eigenschaft eines Measures in einem '''[[Framework:BI_Center:CoPlanner_W%C3%BCrfel_erstellen|CoPlanner Würfel]]''' im Register '''[[Framework:BI_Center:CoPlanner_W%C3%BCrfel_erstellen#Register_.E2.80.9EMeasure.E2.80.9C|Measure]]'''.
| '''Expression''' and '''CalcBackExpression'''-Property of a measure in a '''[[Framework:BI_Center:Create_CoPlanner_Cube|CoPlanner Cube]]''' in tab '''[[Framework:BI_Center:Create_CoPlanner_Cube#.E2.80.9CMeasure.E2.80.9D_tab|Measure]]'''.
| '''CalcBackExpression:''' <span {{CoPFormel}}>[Preis_org]=WAP([Preis])</span><br>
| '''CalcBackExpression:''' <span {{CoPFormel}}>[Price_org]=WAP([Price])</span><br>
'''Expression:''' <span {{CoPFormel}}>FKT_CIF([Menge]=0,[Preis_org],([Umsatz]-[Umsatz absolut])/[Menge])</span>
'''Expression:''' <span {{CoPFormel}}>FKT_CIF([Quantity]=0,[Price_org],([Sales]-[Sales absolut])/[Quantity])</span>
|-
| Calculate Actual/Plan-Variance in percent. If there is no actual value 999,00 %/-999,00 % will be shown.
| '''Expression'''-Property of a measure in a '''[[Framework:BI_Center:Create_CoPlanner_Cube|CoPlanner Cube]]''' in tab '''[[Framework:BI_Center:Create_CoPlanner_Cube#.E2.80.9CMeasure.E2.80.9D_tab|Measure]]'''.
| <span {{CoPFormel}}>FKT_CIF([Plan value]=0,IIF([Act value]=0,0,IIF([Act value]<0,-999/100,999/100)),([Act value]-[Plan value])/[Plan value]) * 100</span>
|}
 
 
{| {{Bausteindesign1}}
|-
|-
| Berechnung einer Ist/Plan-Abweichung in Prozent. Ist kein Ist-Wert vorhanden, werden 999,00 %/-999,00 % ausgewiesen.
| <span style="color: darkblue;">'''Hint'''</span> &nbsp;If the expression refers to a measure you must specify the measurename f.e. [Time], if the expression refers to a filter you must specify the ID like [Time.ID]
| '''Expression'''-Eigenschaft eines Measures in einem '''[[Framework:BI_Center:CoPlanner_W%C3%BCrfel_erstellen|CoPlanner Würfel]]''' im Register '''[[Framework:BI_Center:CoPlanner_W%C3%BCrfel_erstellen#Register_.E2.80.9EMeasure.E2.80.9C|Measure]]'''.
| <span {{CoPFormel}}>FKT_CIF([Planwert]=0,IIF([Istwert]=0,0,IIF([Istwert]<0,-999/100,999/100)),([Istwert]-[Planwert])/[Planwert]) * 100</span>
|}
|}


Line 49: Line 53:
{| {{Bausteindesign1}}
{| {{Bausteindesign1}}
|-
|-
| <span style="color: darkblue;">'''Hinweis'''</span> &nbsp;Eine Ausnahme stellt die LockCondition dar. Diese wird zwar serverseitig ausgefüht, jedoch werden die Attribute auf Basis der [[Framework:Grundlegendes_zu_Ausdr%C3%BCcken|clientseitigen Syntax]] erwartet.
| <span style="color: darkblue;">'''Hint'''</span> &nbsp;LockCondition is an exception. This function will be evaluated by the CoPlanner server, but the attributes have to be written with [[Framework:Fundamentals_of_Expressions|client-side notation]].
|}
|}


Beispiel:<span {{CoPFormel}}><nowiki> [Menge] = 0 and [Zeit.ChildCount] = 0</nowiki></span>
Example:<span {{CoPFormel}}><nowiki> [Quantity] = 0 and [Period.ChildCount] = 0</nowiki></span>
<br><br>
<br><br>
{| {{Bausteindesign1}}
{| {{Bausteindesign1}}
|-
|-
| <span style="color: darkblue;">'''Hinweis'''</span> &nbsp;Wird als Rückgabewert einer Funktion eine Zeichenkette erwartet, ist die gesamte Funktion mit einfachen Hochkomma  <nowiki>'</nowiki> zu qualifizieren.
| <span style="color: darkblue;">'''Hint'''</span> &nbsp;Is the expected return value a string, you have to qualify the whole function as string with <nowiki>'</nowiki>.
|}
|}


Beispiel:<span {{CoPFormel}}><nowiki> 'Menge Ist ' + 'TimeDimAdd(M,-12,[Zeit.ID],IIF('TimeDimFlag([Zeit.ID])'='Y','yyyy','MMM yy'))';</nowiki></span>
Example:<span {{CoPFormel}}><nowiki> 'Quantity act. ' + 'TimeDimAdd(M,-12,[Period.ID],IIF('TimeDimFlag([Period.ID])'='Y','yyyy','MMM yy'))';</nowiki></span>


==Siehe auch==
==See Also==
[[Framework:Grundlegendes_zu_Ausdr%C3%BCcken|Grundlegendes zu Ausdrücken]]<br>
[[Framework:Fundamentals_of_Expressions|Fundamentals of Expressions]]<br>
[[Framework:Angeben eines Ausdrucks|Angeben eines Ausdrucks]]<br>
[[Framework:Specify_an_Expression|Specify an Expression]]<br>
[[Framework:BI_Center:Formeleditor|Formeleditor]]
[[Framework:BI_Center:Formula_Editor|Formula Editor]]




__NOEDITSECTION__  
__NOEDITSECTION__  
<!--
[[Category:Framework|Expression Uses in CoPlanner]]
[[Category:Framework|Verwenden von Ausdrücken]]
[[Category:BI Center|Expression Uses in CoPlanner]]
[[Category:BI Center|Verwenden von Ausdrücken]]
-->


[[de:Framework:Verwenden_von_Ausdr%C3%BCcken]]
[[de:Framework:Verwenden_von_Ausdr%C3%BCcken]]

Latest revision as of 11:10, 2 April 2014

Expressions are used throughout CoPlanner to specify or calculate values in CoPlanner Cubes or masks. This topic provides examples of the many places you can use expressions to vary the content or appearance of a CoPlanner Cube or a mask. This list is not comprehensive. You can set an expression for any property in a Formula Editor that displays the button or in a drop-down list that displays <Expression...>.

Using Expressions

Expressions can contain measures, dimension attributes, application properties, session variables, macros, imports, operators, and function calls. To see or change the expression text, you must open the Formula Editior or type directly in the Properties pane. The following table lists typical ways you can use an expression to display or organize data. You can type an expression directly into a dialog box or in the Properties pane.

Functionality Property, Context, and Object Example
Concatenate text and period function, which reduces the actual date by 12 months and the result is formatted by the given date format. Caption or Tooltip-Property of a measure in an input mask or row view. 'Quantity act. ' + 'TimeDimAdd(M,-12,[Period.ID],IIF('TimeDimFlag([Period.ID])'='Y','yyyy','MMM yy'))'
Concatenate caption of a dimension element and period function and the result is formatted by the given date format. Caption or Tooltip-Property of a measure in an input mask or row view. '[Sub_GuVGKV.Name]' + ' - TimeDimAdd(M,0,[Period.ID],IIF('TimeDimFlag([Period.ID])'='Y','yyyy','MMMM yyyy'))'
Lock a cell of a measure if an other measure (Price) is cero and the dimension element is a leaf element. LockCondition-Property of a measure in an input mask or row view. ([Price]=0 and [Products.ChildCount]=0) or ([Products.ChildCount]>0)
Restrict a filter. Only the products will be shown, assigned the selected product group. SpecialDefinition-Property of a dimension used as filter in an input mask or row view. AttributFilter(Product groups,me_under,[Product groups.ID])
Plausibility check: It should be only allowed to enter a quantity, if a price exists and it is a leaf element. Furthermore only positive quantities are allowed. DataValidation-Property of a measure in an input mask or row view. Dialog box Plausibility Check in the field Settings. [Price]<>0 and <value>>=0
Format font color depending on value. ConditionalStyles-Property in an input mask or row view. Dialog box Conditional Formatting Wizard, define condition in field Condition. [Sales]>=1000000
Calculate weighted price. Expression and CalcBackExpression-Property of a measure in a CoPlanner Cube in tab Measure. CalcBackExpression: [Price_org]=WAP([Price])

Expression: FKT_CIF([Quantity]=0,[Price_org],([Sales]-[Sales absolut])/[Quantity])

Calculate Actual/Plan-Variance in percent. If there is no actual value 999,00 %/-999,00 % will be shown. Expression-Property of a measure in a CoPlanner Cube in tab Measure. FKT_CIF([Plan value]=0,IIF([Act value]=0,0,IIF([Act value]<0,-999/100,999/100)),([Act value]-[Plan value])/[Plan value]) * 100


Hint  If the expression refers to a measure you must specify the measurename f.e. [Time], if the expression refers to a filter you must specify the ID like [Time.ID]


Hint  LockCondition is an exception. This function will be evaluated by the CoPlanner server, but the attributes have to be written with client-side notation.

Example: [Quantity] = 0 and [Period.ChildCount] = 0

Hint  Is the expected return value a string, you have to qualify the whole function as string with '.

Example: 'Quantity act. ' + 'TimeDimAdd(M,-12,[Period.ID],IIF('TimeDimFlag([Period.ID])'='Y','yyyy','MMM yy'))';

See Also

Fundamentals of Expressions
Specify an Expression
Formula Editor