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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
smpa01
Super User
Super User

How to handle space in SSAS Query

Hi,

I have an Analysis Service Query as following where I am querying a SSAS table called - Chart of Accounts like following

 

 

AnalysisServices.Database("powerbi://api.powerbi.com/v1.0/myorg/XYZ", "Price Accuracy_dmOnly", [Query="EVALUATE Chart of Accounts", Implementation="2.0"])

 

 

 and it returns the following errror

 

 

DataSource.Error: AnalysisServices: Query (1, 16) The syntax for '<pii>of</pii>' is incorrect. (<pii>EVALUATE Chart of Accounts</pii>).

 

 

 However, if I delete the space in the table name and change it to CoA and query, it perfectly works

 

 

AnalysisServices.Database("powerbi://api.powerbi.com/v1.0/myorg/XYZ", "Price Accuracy_dmOnly", [Query="EVALUATE CoA", Implementation="2.0"])

 

 

 

I would not have mind doing this manually if it was for a small number of tables. But I am querying almost 15 SSAS tables for a new analysis and I don't want to change the table name manually in the model cause it might break something somewhere else.

 

Is there any way to handle space for SSAS table name in the query window itself.

 

Thank you in advance.

 

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
1 ACCEPTED SOLUTION
sayaliredij
Super User
Super User

You can try putting quotes around table name 

e.g. EVALUATE 'Chart of Account'

 

Regards,

Sayali 

If this post helps, then please consider Accept it as the solution to help others find it more quickly.





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

Proud to be a Super User!




View solution in original post

2 REPLIES 2
smpa01
Super User
Super User

@sayaliredij  it worked, sorry could not update you earlier, thanks !!!

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
sayaliredij
Super User
Super User

You can try putting quotes around table name 

e.g. EVALUATE 'Chart of Account'

 

Regards,

Sayali 

If this post helps, then please consider Accept it as the solution to help others find it more quickly.





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

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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