Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I use the function Number.Round in Power query. It works fine when used from Power BI Desktop
But when I try to refresh the report in Power BI Services (embedded licence), I get the following error :
Data source errorDataSource.Error: PostgreSQL : 42883: function round(double precision, integer) does not exist. DataSourceKind = PostgreSQL. DataSourcePath = ************. Message = 42883: function round(double precision, integer) does not exist. ErrorCode = -2147467259</pii>. . The exception was raised by the IDbCommand interface. Table: rejets
Here is my power query :
let Source = PostgreSQL.Database("*******************),
technique_job_reject = Source{[Schema="technique",Item="job_reject"]}[Data],
#"Filtered Rows1" = Table.SelectRows(technique_job_reject, each true),
#"Added Custom" = Table.AddColumn(#"Filtered Rows1", "Rounded RejectTime", each Number.Round(Number.From([reject_time])*24*60*60,0)/(24*60*60)),
#"Changed Type" = Table.TransformColumnTypes(#"Added Custom",{{"Rounded RejectTime", type datetime}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"reject_time"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Rounded RejectTime", "Date rejet"}})
in #"Renamed Columns"
Can someone help me ?
Solved! Go to Solution.
Hi @SGuichon ,
When I tested with the same query like yours, I got the same error in Power Query Editor:
Try to edit this query when adding the custom column:
#"Added Custom" = Table.AddColumn(#"Filtered Rows1", "Rounded RejectTime", each Number.Round(Number.From([reject_time])*24*60*60)/(24*60*60)),
It should work:
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @SGuichon ,
When I tested with the same query like yours, I got the same error in Power Query Editor:
Try to edit this query when adding the custom column:
#"Added Custom" = Table.AddColumn(#"Filtered Rows1", "Rounded RejectTime", each Number.Round(Number.From([reject_time])*24*60*60)/(24*60*60)),
It should work:
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.