Forum Discussion
Basic DAX Issue
- 7 months ago
You’re writing measure definitions in DAX Query View and pressing Run. But DAX Query View does not accept measure definitions.
Example 1: simple calculation
EVALUATE ROW ( "Result", 2 + 3 )Example 2: test your aggregation
EVALUATE SUMMARIZE ( 'Table 1', "Total AQuality", SUM ( 'Table 1'[AQuality] ) )Now press Run → results will appear.
DAX Query View runs queries (EVALUATE …), not measure definitions. Create measures in the measure editor, or wrap logic in EVALUATE when using Query View.
Hi Clockwise,
check out this, maybe it helps you with kick start:
DAX Query View - Power BI | Microsoft Learn
And, dont forget the "Evaluate" in the beginning 😉
Best regards!
PS: If you find this post helpful consider leaving kudos or mark it as solution
Thanks for the reply. Actually I was reading that page too, so I changed the formulae to something like this.
to
Define
measure 'Table1'[Measure_test] = sum('Table1'[AQuality])
Evaluate
it seems something is working but not fully now, so got this error now.
A single value for column 'AQuality' in table 'Table1' cannot be determined. This can happen when a measure or function formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
I guess the sum was not the right choice,