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
eiashken
Employee
Employee

cosmosdb in PowerBI SQL Statement

I have been trying to add an SQL statement during CosmosDB connection to save time and performance in aggregation.
I got an error that says that I have an error in my errors table..
But the query works in cosmosDB!
Only in POWerBI I have this error... why?
 
SELECT SUBSTRING(c.created, 0, 7) as month,c.status,count(1) as count
FROM c
group by SUBSTRING(c.created, 0, 7),c.status
3 REPLIES 3
v-kelly-msft
Community Support
Community Support

Hi @eiashken

 

What is the error you are getting?In which connection mode do you choose before connecting to CosmosDB?"Import "or "Directquery"?

 

Best Regards,

Kelly

Where can I choose these options?

Hi @eiashken

 

Try the following steps to do the troubleshooting:

 

1.If you dont add the statement, is it available to connect the data source?

2.Have you installed  Cosmos DB ODBC driver?Are you using ODBC Connector in desktop such as below?

 For references,pls click here.

 

 11.png
 
Do check all the questions above,if there still has some errors ,pls advise me what the error you are getting?
 
Best Regards,
Kelly
 

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.