Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
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
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?
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?