Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Markzolotoy
Impactful Individual
Impactful Individual

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 2
GilbertQ
Super User
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?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

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?

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors