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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

DAX working in PBI but not Excel

Hi All, 

 

I got the below query - it works fine in PowerBi but in Excel, I get the error "Invalid Query syntax. A valid MDX or DAX query was expected." - what's going on?

 

=
SUMMARIZE (
    Table14,
    Table14.[X],
    Table14.[Y],
    Table14.[Z],
    "Start Date"MIN ( Table14[Received on] ),
    "End Date"MAX ( Table14[Received on] ),
    "Male"CALCULATE ( COUNT ( Table14[Gender] ), Table14[Gender] = "1" ),
    "Female"CALCULATE ( COUNT ( Table14[Gender] ), Table14[Gender] = "2" ),
    "Indicator""SALES",
    "Location"IF ( Table14[Z] = "A""A""Other" )
)

 

Best,

Dat_Data

2 REPLIES 2
sturlaws
Resident Rockstar
Resident Rockstar

Hi,
what is the context for this error? Are you trying to use the same code in Excel Power Pivot?

 

-s

Anonymous
Not applicable

Hi @sturlaws 

 

I'm trying to run this through DAX studio on Excel but I also get a similar response with Power Pivot.

 

Best, 

Dat_Data

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.