1
votes

I have a DAX variable that contains a table. How can I reference a particular column in that variable?

For example, in the below command, the EVALUATE returns an error. But it works if I replace table1 with FactInternetSales (which is the name of the table which contains that column)

define var table1=FactResellerSales
EVALUATE ROW("a",COUNTBLANK(table1[SalesAmount]))
1

1 Answers

1
votes

You can reference them only using functions that iterate.
For example,

DEFINE
VAR _TABLE1 = FactResellerSales
EVALUATE
{COUNTX(_TABLE1 , _TABLE1 [SalesAmount)}

Other example of iterator functions are sumx, filter.