Forum Discussion
Paginated Reports "All" parameter
- 7 years ago
Blast. It was a picky little syntax error.
EVALUATE ( ...
The command shown above is no good. Report Builder does not like that white space between the EVALUATE keyword and the open pren. The following variation worked fine.
EVALUATE( ...
Thanks for taking the time to look into the problem.
What error message are you getting? I just tried doing the same thing against a copy of the Adventure Works database with the following query and I was able to create a dataset in my report with no problems.
EVALUATE
(
UNION (
DATATABLE (
"Country Region Code", STRING,
"Country Region Name", STRING,
{
{ "ALL", "No Filter" }
}
),
SUMMARIZE ( Geography, Geography[Country Region Code], Geography[Country Region Name] )
)
)- RBunting7 years ago
Advocate III
Blast. It was a picky little syntax error.
EVALUATE ( ...
The command shown above is no good. Report Builder does not like that white space between the EVALUATE keyword and the open pren. The following variation worked fine.
EVALUATE( ...
Thanks for taking the time to look into the problem.
- d_gosbell7 years ago
Super User
The Report Builder Query editor does it's own parsing and sometimes it can't handle things which are actually valid syntax. In terms of pure DAX syntax the whitespace/linebreaks are not significant, plus EVALUATE is a keyword not a function so you don't even need the ( ) you can just do EVALUATE UNION(...)
Or the other thing that could have gone wrong is that are at least 2 different types of space characters. The unicode character set has both a normal space and a non-breaking space (which affects where soft line breaks can appear). Report Builder does not work properly with non-breaking spaces, but you typically only get these when copying from web pages or other documents.
Note that when you paste into DAX Studio these characters get replaced with "standard" spaces so sometimes pasting into DAX Studio then re-copying and pasting the same query back into Report Builder will fix these weird "syntax" errors.