cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
otravers Member
Member

Dataflow: use of M function turns workspace into Premium capacity?

I'm trying to recreate in dataflows some PQ processes I have in Excel and Power BI, and am suprised by the fact using an M function (e.g. a call to a REST API) is bringing up a reference to "computed entities", which are limited to Power BI Premium.

 

The same function can be called and refreshed on a regular Power BI Pro dataset, why would using M functions in Dataflows be limited to Premium?! I'm not trying to calculate aggregations here, I'm just automating API calls.

 

Also, even though the function (creating by pasting M code in a blank query) seems to be recognized as such at creation:

pqo-creation.png

 

It is then automatically turned into a table. Are functions even supported in Dataflows at the moment? I really want to love dataflows but the beta experience has been pretty rough so far.

 

Here's my function just for reference:

 

 

let
ReturnDetails = (placeid as text) =>
Json.Document(Web.Contents("https://maps.googleapis.com/maps/api/place/details/json?placeid=" & placeid & "&fields=website,formatted_phone_number,url,rating&language=en-Au&region=au&key=xyz"))
in
ReturnDetails

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Dataflow: use of M function turns workspace into Premium capacity?

Hi @otravers


What you need to do, is to disable the loading of your function.

 

Here is a great blog post explaining how to fix it and why it happens.

 

https://ssbipolar.com/2018/11/23/power-bi-dataflows-reuse-without-premium/



Did I answer your question? Mark my post as a solution!

"Proud to be a Datanaut!"
10 REPLIES 10
Super User
Super User

Re: Dataflow: use of M function turns workspace into Premium capacity?

Hi @otravers


What you need to do, is to disable the loading of your function.

 

Here is a great blog post explaining how to fix it and why it happens.

 

https://ssbipolar.com/2018/11/23/power-bi-dataflows-reuse-without-premium/



Did I answer your question? Mark my post as a solution!

"Proud to be a Datanaut!"
IEckert Occasional Visitor
Occasional Visitor

Re: Dataflow: use of M function turns workspace into Premium capacity?

I've previously used this method to get functions working with Dataflows. However, now whenever I try to add a function to an entity I get the following message:

 

Can't save dataflow

 

Your dataflow can't be saved because one or more entities references a dynamic data source.

Have Microsoft removed this functionality for Pro Users!
Super User
Super User

Re: Dataflow: use of M function turns workspace into Premium capacity?

Hi there

You have to make sure that your function has been set to "Do not load data"


Did I answer your question? Mark my post as a solution!

"Proud to be a Datanaut!"
Highlighted
PBI_Energetics Frequent Visitor
Frequent Visitor

Re: Dataflow: use of M function turns workspace into Premium capacity?

Perhaps similar issue @GilbertQ @otravers 

Trying to produce a dataflow that gives a single table after scanning over a folder of flat files using the method here

https://ssbipolar.com/2018/12/13/power-bi-dataflows-and-additional-data-sources/

 

The data, function, and sample file have been added as separate "blank" queries and appear to be working, but when the dataflow is returned in desktop, it returns a blank table. Review of the dataflow status in the service has a warning that a computed entity requires premium capacity.

 

Checked the linked below for the description of computed entity, went back to the dataflow to ensure that only the data table is loaded, and function and sample file are not loaded (at least the menu option is unchecked for these)

https://ssbipolar.com/2018/10/23/dataflows-in-power-bi-overview-part-6-linked-and-computed-entities/

 

Now I'm unclear why this would be a "computed entity" if the only table that is loaded is the final table - not the function or the sample file.

 

Any help appreciated ?

PBI_Energetics Frequent Visitor
Frequent Visitor

Re: Dataflow: use of M function turns workspace into Premium capacity?

The following warning now also comes up "The query contains columns with complex types that cannot be loaded"

Super User
Super User

Re: Dataflow: use of M function turns workspace into Premium capacity?

I would suggest working back through the steps to see where it is happening.


Did I answer your question? Mark my post as a solution!

"Proud to be a Datanaut!"
PBI_Energetics Frequent Visitor
Frequent Visitor

Re: Dataflow: use of M function turns workspace into Premium capacity?

Thanks @GilbertQ ,

That prompted a review and comparison of the PQ script running in desktop vs PQ online (the dataflow).

It appears that the online version cannot handle some of the text value replace functions ???

= Table.ReplaceValue(#"Parsed Date1","-",":",Replacer.ReplaceText,{"Last Trade Time"} works in PQ in desktop , but trips up the PQ online when trying to go from a text to a time datatype.

As a test, I removed the step and all following from the dataflow.

The "complex datatype" message then went away and the dataflow then worked fine.

 

Super User
Super User

Re: Dataflow: use of M function turns workspace into Premium capacity?

Hi there thanks for letting us know.

I do know that currently there is not 100% parity between dataflows and Power BI Desktop, which would explain the above.


Did I answer your question? Mark my post as a solution!

"Proud to be a Datanaut!"
otravers Member
Member

Re: Dataflow: use of M function turns workspace into Premium capacity?

Yeah, in my experience PQW's handling of datatypes is a bit of a mess.