Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello,
One Power BI report was based on Sybase but some tables need to use more database which based on PostgreSQL. Do I need to create a new queries or where build a connection. Do I need use
to ODBC:
Source= Odbc.Query("driver={PostgreSQL Unicode(x64)};server=server_name;port=5432;database=db_name", "select … ")
So how to resolve it?
Hi @Analitika ,
Do you want to change the data source from Sybase to PostgreSQL? Or keep Sybase and add PostgreSQL as data source to get more table info? If you want to change the data source, if you refer the content in the following links.
How to change data source in Power BI
And you can refer the following blog to know how to connect to PostgreSQL.
Connecting Power BI To PostgreSQL
Best Regards
Here is the sql with wrong syntax, so how to fix it? I am tring to convert sybase sql to postgresql. Below is picture with errors:
Hi @Analitika ,
Please update PostgreSQL query as below and check whether it can run successfully without error:
SELECT ZUO_KOD,
DID_NR,
ADM_VAR,
DID_DAT,
Eil.skaicius
FROM
(SELECT rows.ZUO_KOD AS ZUO_KOD,
rows.DID_NR AS DID_NR,
rows.ADM_VAR AS ADM_VAR,
rows.DID_DAT,
count(1) AS Eil.skaicius
FROM
(SELECT ot.ZUO_KOD,
ot.DID_NR,
ot.ADM_VAR,
ot.DID_DAT
FROM
(SELECT ID_VIDP AS ID_VIDP2,
ZUO_KOD AS ZUO_KOD,
DID_NR AS DID_NR,
ADM_VAR AS ADM_VAR,
DID_DAT AS DID_DAT
FROM [DBA].VIDP
WHERE DID_DAT >= '" &sFilterDate&"') ot
LEFT OUTER JOIN DBA.VIDP1 ine ON (ot.ID_VIDP2 = ine.ID_VIDP)) ROWS
GROUP BY ZUO_KOD,
DID_NR,
ADM_VAR,
DID_DAT)
You can refer the content in the following link to write PostgreSQL query and use pgFormatter to format your PostgreSQL query.
Best Regards
Hello,
I would like to convert Sybase SQL query to PostgreSQL query. I have working Sybase query but I don't get how apply it to PostgreSQL database. I tried to modify the Sybase query in order to get PostgreSQL query, but getting many syntax errors which I can't fix.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
42 | |
30 | |
27 | |
27 |