|
|
| (2 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| ==Syntax==
| |
| <Calculation name> = <DAX formula>
| |
| Formeln setzen sich wie folgt zusammen:
| |
| * DAX-Funktionen
| |
| * DAX-Operatoren
| |
| * Verweise auf Modellobjekte
| |
| ** table names can be in single Quotes, but don't have to if no blanks or name collision.
| |
| Ship Date = 'Date'
| |
| ** column names in square brackets, but for reading purposes put table name as prefix
| |
| Revenue = SUM([Sales Amount])
| |
| ** measure names in square brackets
| |
| Profit = [Revenue] - [Cost]
| |
| * Konstante Werte, wie z. B. die Zahl 24 oder der Literaltext „FY“ (für Fiscal Year, Geschäftsjahr)
| |
| * DAX-Variablen
| |
| * Leerraum
| |
|
| |
|
| ==DAX Functions==
| |
|
| |
| ===Iterator Functions===
| |
| Iteratorfunktionen durchlaufen alle Zeilen einer angegebenen Tabelle und werten für jede Zeile einen bestimmten Ausdruck aus, wobei der Filter von Visuals auf die Tabelle angewendet wird. They have the suffix '''X'''.
| |
|
| |
| ====SUMX====
| |
| Test1 = SUMX(
| |
| Employees,
| |
| Employees[CapVal]
| |
| )
| |
| which is identical with
| |
| Test1 = SUM(Employees[CapVal])
| |
|
| |
| ===LOOKUPVALUE===
| |
| LOOKUPVALUE(<VALUE_TO_BE_USED>, <VALUE_FOR_LOOKUP>, <SEARCH_VALUE>)
| |
| Revenue = CostCenterRawData[Menge] * LOOKUPVALUE(Ratecards[Rate],Ratecards[Activity Type], CostCenterRawData[Leistungsart])
| |
|
| |
| ===RELATED===
| |
| Hours for Utilization = CostCenterRawData[Menge] * RELATED(Employees[Chargeability])
| |
| Hours for Utilization = CostCenterRawData[Menge] * IF(RELATED(Employees[Chargeability]) <> BLANK(), RELATED(Employees[Chargeability]), 1.0)
| |
|
| |
| ==Data Types==
| |
| * 64-bit Integer
| |
| * 64-bit Real
| |
| * Boolean
| |
| * String
| |
| * DateTime
| |
| * Currency
| |
| * BLANK
| |