DAX: Difference between revisions
(→SUMX) |
|||
| Line 27: | Line 27: | ||
which is identical with | which is identical with | ||
Test1 = SUM(Employees[CapVal]) | 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]) | |||
==Data Types== | ==Data Types== | ||
Revision as of 14:54, 15 March 2022
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])
Data Types
- 64-bit Integer
- 64-bit Real
- Boolean
- String
- DateTime
- Currency
- BLANK