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 have a simple SQL query that creates some temporal tables (#temporal) and when i paste the query in the powerquery it runs quickly and without problems but when i click on close and apply, then it gives me an error.
The query is something like
-- Get something
IF OBJECT_ID('tempdb..#table') IS NOT NULL DROP TABLE #table
SELECT
bla
,bla
,bla
INTO #table
FROM dbo.othertable
and this is the error
if i remove the IF bla bla, then the error is that it doesnt like the INTO.
the weird thing is that in the transform data i can see the table as i want with all values and everthing is correct but when i close&apply the system fails and i dont understand. can someone help me on this?
Regards
Solved! Go to Solution.
there are 2 possible solutions, becase DAX doesnt admit to use create temporaly tables, etc.
1. Create a view in the database that do everthing
2. create a query that doesnt use temporally tables.
i have used the second option ahd this works for me. in case someone has the same problem in the future, maybe the best solution if you can create views or SPs in your database, is to create one
there are 2 possible solutions, becase DAX doesnt admit to use create temporaly tables, etc.
1. Create a view in the database that do everthing
2. create a query that doesnt use temporally tables.
i have used the second option ahd this works for me. in case someone has the same problem in the future, maybe the best solution if you can create views or SPs in your database, is to create one
Hi @dobregon ,
Based on my understanding,it is not only "apply" between power query and power bi, but more options will be created.
Such as check relationships,when you apply from power query,power bi will automatically check the relationships.
Also the syntax between the 2 is different.
Better check the error notification and modify it to the one which power bi can recognize.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
the strange thing is that in powerquery is working properly but then close&apply it fails. i know that it is a query complex but... should work
I'm not sure if this is the problem but doing drops and inserts in a Power BI query is generally not a good idea. You typically only want read-only access to your database from Power BI.
this is rgith, but they are temporaly tables to do insertrs, etc
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.
User | Count |
---|---|
114 | |
100 | |
78 | |
75 | |
50 |
User | Count |
---|---|
144 | |
109 | |
108 | |
87 | |
61 |