Do you even need to use Power Query Functions?

Do you even need to use Power Query Functions?

Guy in a Cube

2 года назад

17,415 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@TheRahuligan
@TheRahuligan - 28.09.2022 18:04

I recently used a function to allow me to iterate through a column of values and pass them as parameters to a REST API call. Figured it'd save me writing multiple queries that are 99% the same (and allows me to keep it dynamic should the list of values I'm querying change!), but I kept running into a Formula.Firewall issue in PowerBI service when attempting to set up scheduled refresh. There was no good way to "rebuild the data combination", as at some point I need to pass the values in as parameters and make the API call, so I was stuck! Anyone else run into this issue?

Ответить
@ItsNotAboutTheCell
@ItsNotAboutTheCell - 28.09.2022 18:34

"Love the Intellisense" - I busted up laughing at that part.

Ответить
@TitusRex
@TitusRex - 28.09.2022 19:00

If the function already exists then you don't need to create a new one.

Ответить
@matthiask4602
@matthiask4602 - 28.09.2022 19:18

I always wondered why so many users use functions though they could just include it in the query.

Ответить
@GaryOJ91
@GaryOJ91 - 28.09.2022 19:30

This isn’t directly related but I really need help.

I’ve worked with HANA in Power BI for years now and never ran into an issue editing the SQL, by double clicking the first “applied step” and changing the sql in the box that opens.

But now, HANA Advanced SQL statement being changed to NativeQuery and I’m unable to edit SQL directly from double cliking in the query editor. They’re re-directing me to the ADVANCED EDITOR which is an insanely long, complex, one-lined code…

Is there a way to go back to the normal way? With the gear icon in the applied steps? I tried going back to an earlier version of PBIDesktop but no help. :(

Ответить
@AMS17121982
@AMS17121982 - 28.09.2022 20:55

I have needed to create a recursive function to resolve a problem within a parent-child hierarchy for a client

Ответить
@rustedrootbeer
@rustedrootbeer - 28.09.2022 22:10

In this case, I'd avoid the function to just keep the Advanced Editor clean. Date.From() is a lot easier than having to click on a function someone made, and understand what it's doing.

Ответить
@benhalicki9749
@benhalicki9749 - 29.09.2022 00:55

If the block of code is complex enough, has a specific purpose and likely to be reused, then yeah a function is a good idea.

Ответить
@lalalf4535
@lalalf4535 - 29.09.2022 01:15

I often use these functions when i create calendar table in PQ

Ответить
@MrSparkefrostie
@MrSparkefrostie - 29.09.2022 02:45

I think you have answered a question I was going to have when I start configuring incremental refresh

Ответить
@joevahling7530
@joevahling7530 - 30.09.2022 04:33

I find setting the type when the default sets as any, saves me from having to add another PQ step of setting the type later.

Ответить
@punit6490
@punit6490 - 05.10.2022 07:54

Using inbuilt functions of PQ keeps the query versatile.

I ask two questions before deciding on using a function :
Does PQ has an inbuilt function or functions for the purpose?
How much cleanliness /readability the function provides?

Ответить
@MarekHouska
@MarekHouska - 10.10.2022 13:39

Great! Thank you.

Ответить
@nareshsekar4807
@nareshsekar4807 - 23.11.2023 13:43

Thank you. Good explanation

Ответить