Start debugging this way:
- Create a test PostgreSQL database on a different server and try to connect to that through Power BI. Use the default Power BI connector for PostreSQL. Is this working?
- Now try to connect again to that test PostgreSQL database but this time through the SQL query. Is it working?
- Now encrypt the test database with AES-128-CBC. Try to connect first with the official Power BI connector for PostgreSQL and then through the SQL query. Is it working with both?
This is how I would debug the whole thing