简体   繁体   中英

Using Postgresql stored function as a data source in Power BI

I am trying to use a stored function I have written in Postgresql as a data source for a Power BI chart. The function accepts four parameters all of date type. The function signature looks like this:

get_revenue_metrics(signup_start_date, signup_end_date, revenue_start_date, revenue_end_date)

This function uses these dates in multiple where clauses to create and return a table. I want to use that table to then build charts in my dashboard.

I did come across this link which talks about using a SQL function in Power BI, but it is for Azure SQL Server and not Postgresql. From the very first step as mentioned in the link before, I do not see any option to

Select the sql function when you initially select your data sources.

Is there something I am missing? Thanks for the help!

The "table picker" is pretty simplistic, and for some objects you'll have to start with a SQL query. See PostgreSQL - Connect using advanced options

I found this video that walks you through the entire process. I am very new to power BI so it was intimidating at first but this video was pretty straight forward and easy to understand.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM