EVALUATEANDLOG
Its first argument's value, or table, unchanged; OpenBI writes no evaluation log.
Group: Information. Compatible with DAX.
Syntax
EVALUATEANDLOG ( <value> [, <label>] [, <maxRows>] )
| Parameter | Type | Description |
|---|---|---|
value | Value or table | The expression to evaluate: a value or a table. It is given back unchanged. |
label | Text optional | In Power BI Desktop, the name its log entry carries. OpenBI accepts it and does nothing with it. |
maxRows | Whole number optional | In Power BI Desktop, how many rows of a table its log shows (10 when left out). OpenBI accepts it and does nothing with it. |
Returns
Same as its value. The value, or the whole table, that the first argument gives.
Remarks
- Power BI Desktop writes what the expression gave, in each context it was evaluated in, to a trace for debugging. OpenBI writes no such log: the function only passes its argument on.
- So a measure that still carries it gives the same answer as without it, in OpenBI as in Power BI.
- The row count limits only Desktop's log, never the result: a table comes back with all its rows.
- To look inside a measure in OpenBI, evaluate its parts as columns of a query, with
ROW,ADDCOLUMNSorSUMMARIZECOLUMNS.
Compared with DAX
Power BI Desktop logs each evaluation as a trace event that DAX debugging tools show. OpenBI writes no log: the label and the row count are accepted for compatibility and change nothing.
Examples
A value passes through
EVALUATE
ROW (
"Plain", EVALUATEANDLOG ( 6 * 7 ),
"Labelled", EVALUATEANDLOG ( 6 * 7, "answer" )
)
| Plain | Labelled |
|---|---|
| 42 | 42 |
A table comes back whole
The row count of 2 would only shorten Desktop's log.
EVALUATE
EVALUATEANDLOG ( DATATABLE ( "n", INTEGER, { { 1 }, { 2 }, { 3 } } ), "three rows", 2 )
| n |
|---|
| 1 |
| 2 |
| 3 |
Around a measure, per product
EVALUATE
SUMMARIZECOLUMNS (
Products[Product],
"Liters", EVALUATEANDLOG ( [Liters sold], "per product" )
)
ORDER BY Products[Product]
| Products[Product] | Liters |
|---|---|
| Cider | 301074 |
| IPA | 331884 |
| Lettøl | 169179 |
| Pils | 1004326 |