Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi There,
I have this below query and it is working very well in SQL navigator. However, I am getting this below error in Power BI.
DataSource.Error: ODBC: ERROR [HY000] [Oracle][ODBC][Ora]ORA-00933: SQL command not properly ended
Below, is the query.
(select ASSET_ID,T.pno,CREATED_DATE_UTC,CREATED_USER, MODIFIED_USER,u.EAL as EAL_Location,
case
when AS_ID = '1' then 'R'
when AS_ID = '2' then 'y'
when AS_ID = '3' then 'B'
when AS_ID = '4' then 'O'
when AS_ID = '5' then 'G'
end as E_Status,
case
when TSL = '1' then 'Open'
when TSL = '2' then 'Closed'
end as Status,
lead(case
when AS_ID = '1' then 'R'
when AS_ID = '2' then 'y'
when AS_ID = '3' then 'B'
when AS_ID = '4' then 'O'
when AS_ID = '5' then 'G'
end ) over (partition by ASSET_ID order by RDATE) next_status, RDATE , lead(RDATE) over (partition by ASSET_ID order by RDATE) next_datum from dbo.trim_request r
join ta_ac d t on t.PID = r.asset_id
join dbo.clients u on u.logon_name = r.CREATED_USER
WHERE r.RDATE > = to_date('01-01-2017','dd-mm-yyyy') AND t.p_oem = 'PK')
select
case
when AS_ID = '1' then 'R'
when AS_ID = '2' then 'y'
when AS_ID = '3' then 'B'
when AS_ID = '4' then 'O'
when AS_ID = '5' then 'G'
end as E_Status, next_status, datum, next_datum, next_datum - datum diff from r
where status in ('B', 'y', 'R') and next_status = 'G'
order by datumanyone has Idea?
Solved! Go to Solution.
Hi @rocky09,
After a few research, I found that there could be a few cause to this issue:
Could you go to check if it helps in your scenario?
In addition, if the issue persists, I would suggest you create a support ticket on Power BI Support page for better assistance. ![]()
Regards
Hi @rocky09,
After a few research, I found that there could be a few cause to this issue:
Could you go to check if it helps in your scenario?
In addition, if the issue persists, I would suggest you create a support ticket on Power BI Support page for better assistance. ![]()
Regards
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 68 | |
| 46 | |
| 44 | |
| 29 | |
| 20 |
| User | Count |
|---|---|
| 202 | |
| 130 | |
| 102 | |
| 71 | |
| 55 |