Refresh failed : A cyclic reference was encountered during evaluation - powerbi

I have power bi desktop report that needs to refresh. when i hit refresh it gives me the error "A cyclic reference was encountered during evaluation".
This report consist of ODBC snowflake queries which has "select * from table" for odbc query. And there is no merges or append queris. This refresh worked for 2021 December update but for newer versions this issue remains same. 
Do anyone have some idea regarding this? Please help

Related

Powerbi refresh issue

When I refresh the powerbi report in powerbi service, I end up getting an empty table.
When I refresh it in powerbi desktop, I don't have any issues refreshing. In the online environment, powerbi service, I get the report initially on first upload. When I refresh the dataset and the report I end up getting the empty table shown or a summarized version.
First I thought this would be a datatype issue, so I changed the week of year to the start date of that week, but that also didn't work. I tried both a date table of my own and an external one, both gave me the same issue.
Any suggestions on what I can try to make this work? Perhaps a different way to display weeks in powerbi? Thanks in advance.
failed refresh 1
failed refresh 2
how it should be
I have found the solution.
When I extracted the data to powerbi I then transformed the date from date/time to date in powerbi. This seemed to have caused the refresh to mess up.
Once I deleted the transformation and then changed my separate date table to date/time aswell, I reuploaded the report and it no longer showed a bad refresh.

Power bi scheduled refresh fails with error but manual refresh successfully completed

Please help me in resolving the issue.
There are 6 reports in my workspace connecting to same database but only one report is facing the issue when it's dataset is refreshed. It's scheduled refresh fails with error 
Column '....' in table '....' contains a duplicate value '.....' and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table. Table: ......
But when refreshed manually after an hour or so it's successful.
There was no issue initially but I can see the report fails daily in past one month.
My analysis
There are no duplicates in the column mentioned in the error message as we are using "distinct" in transform data. I have checked the data as well and i could see no duplicates.
I am not using incremental refresh
Gateway connection is working fine as the rest of the reports are being successfully refreshed and the status also shows as successful.
4.there are no changes being made to the database during the interval of scheduled and manual refresh.
I want to know what would cause this issue.

SnowFlake & PowerBI "native queries aren't support by this value"

Quick Note, I have reviewed these threads and they do not fix my issue:
( Outdated info, see documentation below ) Access Snowflake query results through PowerBI
( I would expect this to fix my issue, but it does not ) How to write a Snowflake SELECT statement query in Advance Editor from powerBi
Hi All,
When attempting to query snowflake with a native query, I get this error:
These are the parameters:
I have verified the credentials / tables /  databases / schemas are correct by connecting to directly to one table at a time, but simple queries like the screenshot and complex queries all return this message "native queries aren't support by this value".
I know this is a new feature ( June 2021 ) and I have read the documentation here: https://learn.microsoft.com/en-us/power-query/connectors/snowflake#connect-using-advanced-options
EDIT:
I have tried the following query formats:
SELECT * FROM "MyDatabase".PUBLIC.ITEMSTABLE
SELECT * FROM "MyDatabase"."PUBLIC".ITEMSTABLE
SELECT * FROM "MyDatabase"."PUBLIC"."ITEMSTABLE"
I believe that this may be due to my MyDatabase being case sensitive and PowerBI stripping the quotes around it in the query.
In snowflake, this query succeeds while the same query in PowerBI fails:
SELECT * FROM "MyDatabase".PUBLIC.ITEMSTABLE
Issue opened with Microsoft here:
https://community.powerbi.com/t5/Issues/Unable-to-query-case-sensitive-Snowflake-tables/idc-p/2030983
Any help is appreciated.
Most likely the query provided in message box is terminated with semicolon. It should be removed from the source query:
And actual query sent to Snowflake:
As we can see it is wrapped with outer query so any kind of input that makes the full query invalid one will error out.
I had similar issue with Native query written using Dataverse as Datasource. PowerBI Refresh was successful on the power bi desktop but refresh was failing on powerbi server. It was fixed for me when I have appended [EnableFolding=false] keyword in the native query. I have attached the screenshot for a reference of what i have modified. Hope this will help someone
enter image description here
Regards,
Mohith
It has been confirmed by a Microsoft ticket that my issue was that I had a case sensitive database name. The solution from MS was to... Not have a case sensitive DB name.

Snowflake + Power BI Connections

I am trying to connect Snowflake to Power BI. I have downloaded the ODBC driver
https://sfc-repo.azure.snowflakecomputing.com/odbc/win64/latest/index.html but I get an error when I sign in to the snowflake connector with my Microsoft Account. I use AD to login to Snowflake.
This is the error:
section Section1;
shared Query1 = let
Source = Snowflake.Databases("XXXXXXXXXazure.snowflakecomputing.com",
"XXX_XXX_XXXX", [CreateNavigationProperties=null,
ConnectionTimeout=null, CommandTimeout=null]) in
Source;
Does your Azure AD login work in the Snowflake Web UI? I also believe there might be an issue with the March version of Power BI. Try using the February version instead (learn.microsoft.com/en-us/power-bi/desktop-latest-update-archive) and follow this blog: snowflake.com/blog/using-sso-between-power-bi-and-snowflake
Experienced the same problem. We created a case at Microsoft and they responded there's a faulty DLL file (C:\Program Files\Microsoft Power BI Desktop\bin\ODBC Drivers\Simba Snowflake ODBC Driver\SnowflakeODBC_sb64.dll in PowerBI March 2020 release (2.79.5768.1082) which is causing this failure.
We've received an updated DLL file and now the problem is solved. This update will be included in the next PowerBI release (don't know when this release is planned). For now there are a few possible solutions:
Request updated DDL with Microsoft and replace faulty file
Go back to the feb 2020 release of Microsoft PowerBI
Wait for next release PowerBI
As indicated by Suzy... In the March release of Power BI Desktop there was a bug introduced which caused this error. Completely install this version and download a previous version. I don't know if the April or May version has been released yet but I would hope MS fixed it in a more recent build.
If you are interested in some information on how to securely implement Power BI scheduled refreshes without using the data gateway, check out the LinkedIn article I wrote within the last day: https://www.linkedin.com/pulse/securely-using-power-bi-snowflake-bryan-meier/

A query failed due to an invalid table, column, or object name in power BI service

My report was running normally yesterday but now the report on power bi service gives an error of A query failed due to an invalid table, column, or object name.
The gateway is online and doesn't seem to have any issues regarding that.
The report works fine on power bi desktop.
I could not figure out the exact issue for this error.
Could anyone please help me figure this out?
This is what I Get from show details
Not much detail here.
The solution to my question was simple. I work on the .pbix on my local machine and deploy the .pbix to the service linking live database from RDP.
The issue was column name difference in the local database and the live database.
I figured this out by comparing each tablename and columnname for all the tables in both databases.