Forum Discussion
Server refresh error - Expression.Error: We cannot convert the value <pii>"[Table]"</pii> to type <p
Hi,
I am getting below mentioned error on refreshing the data on Power BI service. However, the desktop refresh works perfectly fine.
Last refresh failed: Wed Mar 02 2022 22:30:02 GMT+0530 (India Standard Time)
There was an error when processing the data in the dataset.Hide details
Data source error: | Expression.Error: We cannot convert the value <pii>"[Table]"</pii> to type <pii>Table</pii>.. Value = <pii>[Table]</pii>. . The exception was raised by the IDbCommand interface. Table: Final_View |
Cluster URI: |
|
Activity ID: |
|
Request ID: |
|
Time: | 2022-03-02 17:00:02Z |
Query for Final_View is as follows:
"select A.Column2 as ""Reporting Struct. Bridge"",B.Column1 as ""Income.Column1,B.Column2 as ""Income Statement Reporting Structure""
from
(select distinct Column1, Column2
from Table1
where Column1 IS NOT NULL)A
cross join
(select distinct Column1, Column2
from Table1
where Column1 IS NOT NULL)B
where A.Column1<=B.Column1
order by B.Column1, A.Column1
"
What could be reason and problem with the above query? Could you please share the correct SQL query with me?
Thanks
I found the solution for this.
The query was alright, it was created without quotes in the snowflake. The data types were also matching. The issue was with the connectivity on service as desktop refresh was working fine. The model was published for the first time on service and data source connections were not signed in. After signing them the refresh on service also worked.
3 Replies
- lbendlinSuper User
You have issues with the double quote escaping. Use square brackets instead. There is also no real point in sorting the output.
with c as (SELECT DISTINCT column1, column2 FROM table1 WHERE column1 IS NOT NULL) SELECT A.column2 AS [Reporting Struct. Bridge], B.column1 AS [Income.Column1], B.column2 AS [Income Statement Reporting Structure] FROM C AS A CROSS JOIN C AS B WHERE A.column1 <= B.column1 - MaricoHelper IV
I found the solution for this.
The query was alright, it was created without quotes in the snowflake. The data types were also matching. The issue was with the connectivity on service as desktop refresh was working fine. The model was published for the first time on service and data source connections were not signed in. After signing them the refresh on service also worked.