cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Dat_Data Frequent Visitor
Frequent Visitor

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 Established Member
Established Member

Re: DAX working in PBI but not Excel

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

 

-s

Dat_Data Frequent Visitor
Frequent Visitor

Re: DAX working in PBI but not Excel

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
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 105 members 2,688 guests
Please welcome our newest community members: