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

Microsoft SQL: Incorrect syntax near the keyword 'union'. Table: SalesFact.

Hi All,

 

Can anyone help me with this error. When i refresh data set in powerbi service it give me this error.

 

Microsoft SQL: Incorrect syntax near the keyword 'union'. Table: SalesFact.

 

Where as in powerbi desktop the table is getting refreshed.

1 ACCEPTED SOLUTION

Accepted Solutions
amjedashraf Frequent Visitor
Frequent Visitor

Re: Microsoft SQL: Incorrect syntax near the keyword 'union'. Table: SalesFact.

 

Hi All,

 

i got the solution to this error, it was append query which was making the error. I was appending some data from another table. 

 

if anyone face this error in future always look for append in your query in your table just delete it this error will be resolved.

 

The append query was working fine but maybe now the data has increased in the table so it was not working fine. Thanks

 

5 REPLIES 5
Pauwnrajpp Member
Member

Re: Microsoft SQL: Incorrect syntax near the keyword 'union'. Table: SalesFact.

Hi amjedashraf,

 

Please check the SQL query of the datasets and overwrite your Datasource for the report in Power BI Service if required.

 

 

Regards,

Pradeep

amjedashraf Frequent Visitor
Frequent Visitor

Re: Microsoft SQL: Incorrect syntax near the keyword 'union'. Table: SalesFact.

Hi Pauwn,

 

I have checked the query, in the query editor there is no word like union in the query and there is no syntax error in the query editor. 

 

Dont know what is happening.  

Pauwnrajpp Member
Member

Re: Microsoft SQL: Incorrect syntax near the keyword 'union'. Table: SalesFact.

Have you checked in your filters/Transformations applied in the datasets?

amjedashraf Frequent Visitor
Frequent Visitor

Re: Microsoft SQL: Incorrect syntax near the keyword 'union'. Table: SalesFact.

 

Hi All,

 

i got the solution to this error, it was append query which was making the error. I was appending some data from another table. 

 

if anyone face this error in future always look for append in your query in your table just delete it this error will be resolved.

 

The append query was working fine but maybe now the data has increased in the table so it was not working fine. Thanks

 

Pauwnrajpp Member
Member

Re: Microsoft SQL: Incorrect syntax near the keyword 'union'. Table: SalesFact.

Good. Appending two tables is being part of Transformations of Power BI.

Helpful resources

Announcements
GregDeckler

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Ideas
Users Online
Currently online: 40 members 991 guests
Please welcome our newest community members: