Testtest11
Testtest11

Reputation: 367

Return table measures in DAX

How I can use created measures for DAX table? For columns or calculated columns it works (count is only for example):

EVALUATE
row("test", count(FactSales[Sales]))

but for measure I get (in DAX Studio):

EVALUATE
row("test", count(FactSales[Sales2]))

Column 'Sales2' in table 'FactSales' cannot be found or may not be used in this expression.

The column must exist because I dragged and dropped it from left Dax Studio panel. This table came from Power BI model and measure works there.

Upvotes: 0

Views: 2806

Answers (1)

sastrup
sastrup

Reputation: 189

COUNT() expects a column. From your reply above, it sounds like [Sales2] is a measure. You cannot count a measure.

If you want to return the value of [Sales2], take the COUNT() away and just leave:

EVALUATE
ROW ( "test", [Sales2] )

Upvotes: 1

Related Questions