Forum Discussion
Problem with DAX in paginated report
I am having this expression in the design Mode:
GROUPBY('TableName', 'TableName'[FieldName], "Counts", COUNTX(CURRENTGROUP(), 'TableName'[FieldName])). Works fine in PBI Desktop but in the paginated report it gives me:
TITLE: Power BI Report Builder
------------------------------
Query preparation failed.
------------------------------
ADDITIONAL INFORMATION:
Query (1, 55) The syntax for '<pii>[FieldName]</pii>' is incorrect. (<pii>GROUPBY('TableName', TableName'[FieldName], "Counts", COUNTX(CURRENTGROUP(), 'TableName'[FieldName]))</pii>). (Microsoft Analysis Services)
Any idea?
Thanks
2 Replies
- GilbertQ
Super User
Hi Markzolotoy
What happens if you try this same query in DAX Studio and get the query to return the data you want there?
Then in paginated reports you can then copy this DAX into the query section of the dataset?
- Markzolotoy
Impactful Individual
You mean the exact same code from DAX Studio? No, it's not working in the report. Don't I have to get an actual query source code and paste it into report's query designer?