powerquery

Excel Power Query - Sleep or Wait Command to Wait on API Rate Limit

北城以北 提交于 2021-02-04 19:58:51
问题 In Excel Power Query (PQ) 2016, is there such a function that can insert a "SLEEP 15 seconds" before proceeding? Not a pause, but a sleep function. Problem: I wrote a function in PQ to query: https://westus.api.cognitive.microsoft.com/text/analytics/v2.0. That function works fine, as designed. I have a worksheet with 10K tweets that I want to pass to that function. When I do, it gets to ~60 or so complete and I get an ERROR line in PQ. A look at Fiddler says this: message=Rate limit is

What do “Enable Load” and “Include In Report Refresh” mean/do?

好久不见. 提交于 2021-02-04 17:10:41
问题 In Power Query, when I right-click on the name of a query (in the left-most pane of Power Query's window) I see selections for "Enable Load" and "Include In Report Refresh." I cannot find an explanation of what these two selections actually mean and do. I'd definitely appreciate a brief tutorial. 回答1: "Include In Report Refresh" means query is automatically refreshed when you press "Refresh" button on the ribbon. "Enable Load" means query results are available for report builder. Otherwise

What do “Enable Load” and “Include In Report Refresh” mean/do?

我怕爱的太早我们不能终老 提交于 2021-02-04 17:07:38
问题 In Power Query, when I right-click on the name of a query (in the left-most pane of Power Query's window) I see selections for "Enable Load" and "Include In Report Refresh." I cannot find an explanation of what these two selections actually mean and do. I'd definitely appreciate a brief tutorial. 回答1: "Include In Report Refresh" means query is automatically refreshed when you press "Refresh" button on the ribbon. "Enable Load" means query results are available for report builder. Otherwise

How can I combine the first two rows in 52 files as a header row and combine all the files in a single one in Power Query?

南笙酒味 提交于 2021-01-29 19:05:27
问题 I have 52 files with >50 columns. The first two rows in each of them are header rows, so they need to be combined into a single row and I want to combine them all into a single file. There are some files with a different number of columns or different column names, so if PowerQuery identifies those, I can deal with them seperately. The only way I can think of is opening each file, running a macro to combine the first two rows in all of the files, but is there a more efficient way to do that

Power Query - M Language: Sum with Group By for multiple columns

佐手、 提交于 2021-01-29 16:22:46
问题 I'm looking to write a DataTransform for an imported csv file which performs the following: GroupBy: State Action: Sums all columns The Input data looks like: The output I'm looking for would show a row each State, a column for each date, and the sum for that date. Just using the Table.Group and List.Sum, I'm able to get this for specific dates: = Table.Group(#"Change Dates to Num", {"Province_State"}, {{"4/19/20", each List.Sum([#"4/19/20"]), type number}, {"4/20/20", each List.Sum([#"4/20

Power Query, keep output table same size while refreshing

风格不统一 提交于 2021-01-29 12:32:26
问题 I'm using this code to filter some text out of a .txt file. Then in another sheet i use cell references to built my custom table. Everything is working great, except if the source file is empty, Power Query resizes the output table so that the reference got broken in the second sheet. =cellref!$C4 how can I prevent power query to resize the range in his table? or, somehow, keep the same number of rows/column so that it won't break my references? let Source = Table.FromColumns({Lines

How to prevent power query from fetching data for merge source tables?

≡放荡痞女 提交于 2021-01-29 12:22:52
问题 In Power query I have table A and table B. I have merged these to create table C and expanded to keep the column I need in my report. When I refresh the data, it fetches data from the source database into all 3 tables. It doesn't allow me to delete tables A and B because they are used by the merge table C. I have tried both unchecking enable load on the tables A and B as well as unchecking include in report refresh. As mentioned here (see comment section on answer - What do "Enable Load" and

Power Query - Merged Query Returning Incorrect Result

跟風遠走 提交于 2021-01-29 10:34:48
问题 I have 2 tables that are merged on multiple fields, when I preview the result, it is correct (Rank = 712) as can be seen from this image: However when I expand the resultant table, an incorrect value (Rank = 1) appears: Has anyone ever seen something like this before? 回答1: If you sorted Ranking table,find step:"Sorted Rows",and add Table.Buffer outside Table.Sort,like Table.Buffer(Table.Sort()) ,then it will be correct. 来源: https://stackoverflow.com/questions/50321954/power-query-merged-query

How to write a nested IF statement that has multiple outputs?

老子叫甜甜 提交于 2021-01-29 09:40:21
问题 The context: Column 1 Column 2 Column 3 Column 4 (IF statement result column) a,b 2.99 $2.99 1/2 mismatch a a,b 3.49 $2.89 Column 1/2 mismatch,3/4 mismatch b a 1.99 $2.99 Column 1/2 mismatch,3/4 mismatch a,b a,b 3.49 $3.49 so only in stance of and exact match (I have many columns that have comparable values that I need to follow this pattern). Is there a way to do this? 回答1: I don't think you need nested IF statements, just CONCATENATEX : Result = VAR ColList = { [Column1], [Column2], <..

Power BI Desktop incremental table update from Power Query

与世无争的帅哥 提交于 2021-01-28 02:10:09
问题 I'm gathering my data from a third-party REST API which has many thousands of records but updates each day with many more and so refreshing my data sources becomes a long task. So I was wondering if there was any way to do incremental loads and only scrape the last 30 days worth of data from the API and append that to a table in PowerBI Desktop. I've looked into the append queries feature but this seems to only be able to join 2 queries and return a single table, which would eventually run