sql
3 TopicsRELATED do not work with SQL direct query
Hi together, I have a few databases on sql servers which a get in powerbi via direct query. I created relationships between the datasources and not want to add new columns using the RELATED command. I always get an error that there is no realtionship or the column which i would to take is not availible. But both failures do not exist. The column is there and i choose it from the suggestions which powerbi makes when i search for it and the relationship is also there. I must go via direct query and not import cause the files are too big. It it possible that RELATED do not work with SQL Servers as sources via direct query? Thanks a lot for your help.519Views0likes2CommentsSQL does not work in Power BI
Hi guys, I hope you can help me. I have an SQL query that works fine when I run in my MS SQL Server Management Studio but when I connect Simba Athena and Power BI, I get this error when I ran the query below. SELECT *,CASE WHEN CountyAndId LIKE '[A-Z][A-Z]%' THEN SUBSTRING(CountyAndId,1, 2) WHEN CountyAndId LIKE '[A-Z]%' THEN SUBSTRING(CountyAndId,1, 1) ELSE CountyAndId END as CountyCode FROM ( SELECT LTRIM(RTRIM([Registar])) as 'Registar' ,LTRIM(RTRIM(ma.[Main_Name])) as 'Main_Name' ,LTRIM(RTRIM([StatCodeMopel])) as 'Mopel_Description_En' ,LTRIM(RTRIM([YearM])) as 'YearM' ,LTRIM(RTRIM([Engs])) as 'EngsZ' ,LTRIM(RTRIM([Body])) as 'Body' ,LTRIM(RTRIM([Date1])) as 'Date1' ,LTRIM(RTRIM([Date2])) as 'Date2' ,LTRIM(RTRIM([DateS])) as 'DateS' ,LTRIM(RTRIM([MotorT])) as 'MotorTC' ,LTRIM(RTRIM([FuelType])) as 'FuelType' ,LTRIM(RTRIM([Tracks)) as 'Tracks' ,LTRIM(RTRIM([Colon])) as 'Colon' ,LTRIM(RTRIM([Tavan])) as 'Tavan]' ,LTRIM(RTRIM([stad])) as 'staddsd' ,LTRIM(RTRIM([Regs])) as 'Regs' ,LTRIM(RTRIM([emy])) as 'emyis' ,LTRIM(RTRIM([wng])) as 'wngr4' ,CASE WHEN Registar LIKE '[0-9][0-9][0-9]%' THEN SUBSTRING(Registar,4,LEN(Registar)-3) WHEN RegistarLIKE '[0-9][0-9]%' THEN SUBSTRING(Registar,3,LEN(Registar)-2) ELSE LTRIM(RTRIM(Registar)) END as CountyAndId FROM Combined c, VRUMake ma WHERE c.Main = ma.Main_Code AND CONVERT(DATETIME, CASE WHEN ISDATE(Date1) = 1 THEN Date1 ELSE NULL END) BETWEEN '2022-03-01' AND '2022-04-01' AND Body IN ('01','02','40','41','42','76','77','78','92','96') AND [VehS]='N' )d ORDER BY CONVERT(DATETIME, CASE WHEN ISDATE(Date1) = 1 THEN Date1 ELSE NULL END) I am wondering if the syntax is different from MS SQL and Power BI ? Is there any workaround on how to used datetime function in Power BI? Thanks,534Views0likes1CommentUnable to Connect we encountered an error while trying to connect with Microsoft SQL
Hello Guys, while i am trying to connect to SQL Server, it was showing some error message. The content of the error message can be found below in bold.. Details: "Microsoft SQL: A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)" For reference please check with the screenshot of the error message which was attached to this post or message.. Kindly put down the solution(s) in step by step manner as it would be helpful to me and the PBI community as well...Solved53KViews0likes2Comments