powerquery

vba code for changing query xls source prompt

a 夏天 提交于 2021-02-11 14:13:39
问题 I was searching for a simple vba code that open the prompt for change source for query that is xls sheet. I have a lot of query steps that i need to do every time that source is changing. So basically i would like to have macro that does this manual steps for a certain query name (i have a number of them in a workbook): in the query edit mode, click the source change button:source macro should open the prompt so that i can manually pick the xls file:screen also, the data can be in a sheet

Excel Power Query. Different Formulas for Each Row of Values from Other Rows

时间秒杀一切 提交于 2021-02-10 14:41:00
问题 I have a table 1 of 500+ rows that are updated multiple times during a month by a request. And there is a updated table of different formulas (200+) that should be calculated using values from table 1. Table 1 year product value 1993 Apple 98.45 1994 Mushrooms 67.54 1992 Apple 95.45 2021 Melon 112.0 Table 2 id formula 1 1994/1993*100-100 2 1994-1993 3 2021/1992*100-100 etc... My way: in table_1 I have created a key column - year. I have modified the formula (below - a pic): Code for table_2:

Excel Power Query. Different Formulas for Each Row of Values from Other Rows

落爺英雄遲暮 提交于 2021-02-10 14:37:14
问题 I have a table 1 of 500+ rows that are updated multiple times during a month by a request. And there is a updated table of different formulas (200+) that should be calculated using values from table 1. Table 1 year product value 1993 Apple 98.45 1994 Mushrooms 67.54 1992 Apple 95.45 2021 Melon 112.0 Table 2 id formula 1 1994/1993*100-100 2 1994-1993 3 2021/1992*100-100 etc... My way: in table_1 I have created a key column - year. I have modified the formula (below - a pic): Code for table_2:

How can I use input from a TextBox in a PowerQuery Formula?

筅森魡賤 提交于 2021-02-08 10:20:30
问题 I would like to use a PowerQuery Formula which includes input from a text box like Json.Document(Web.Contents("https://thesite.com/api/widgets", [Query=[name=TextBoxName.Text]])) But I get this error Expression.Error: The import TextBoxName.Text matches no exports. Did you miss a module reference? How do I use TextBoxName.Text as a parameter in my query? 回答1: Does it have to be a text box? Put the value in an Excel table instead and call that table "Parameters". Then write a function that

How can I use input from a TextBox in a PowerQuery Formula?

╄→尐↘猪︶ㄣ 提交于 2021-02-08 10:19:22
问题 I would like to use a PowerQuery Formula which includes input from a text box like Json.Document(Web.Contents("https://thesite.com/api/widgets", [Query=[name=TextBoxName.Text]])) But I get this error Expression.Error: The import TextBoxName.Text matches no exports. Did you miss a module reference? How do I use TextBoxName.Text as a parameter in my query? 回答1: Does it have to be a text box? Put the value in an Excel table instead and call that table "Parameters". Then write a function that

PowerQuery table refresh stops with an error

自古美人都是妖i 提交于 2021-02-08 10:00:34
问题 I have experienced several time situation where using power query and refreshing large table (~300K rows) it stops loading rows with an error: Error Message: The MashupResource's PageReader is not available. Stack Trace: System.InvalidOperationException: The MashupResource's PageReader is not available. at Microsoft.Mashup.Client.Excel.FillManager.RefreshFillSession.GetSchemaInfo() at Microsoft.Mashup.Client.Excel.FillManager.RefreshFillSession.CompleteRefresh(IWorkbook workbook, Boolean

DAX : Allocate Inventory to Open Orders

╄→гoц情女王★ 提交于 2021-02-05 11:45:28
问题 I am trying to allocate inventory items to open orders in DAX, PowerBi. The idea is to allocate all the available inventory to the oldest order first, then allocate the remaining inventory to the second oldest, etc. until the inventory is depleted. The inventory can be depleted even if the open order is not completely satisfied. Please check the attached picture as an example for the allocations below I tried adding a column in the open order table using the Calculate function but the results

M power query - rebuild this data combination

你。 提交于 2021-02-05 10:47:25
问题 Getting the error message on the below query in M, I've tried splitting into 2 different queries before the merge step but still getting the 'this does not directly access a data source, please rebuild the data combination' error *let Source = #"Query List from SP", cols = if {"Type"} = "Indicator" then 4 else 5, DataLoad = (path) => let Doc = Csv.Document( Web.Contents( BaseUrl, [Headers =[#"Content-type"="text/csv", #"Authorization"="Basic " & Credential], RelativePath=path ]), [Delimiter="

Combine Same Tab from Multiple Workbooks in One Power Query

半腔热情 提交于 2021-02-05 08:18:24
问题 I have 32 Spreadsheets which all have the same tab "DashboardQuery". On the tab is a table set up with Metrics and values. The Table name is "QueryData". Below is an image of the 'QueryData' table. I would like to create a power query that combines the data from each of these spreadsheets into one table which has the metrics as headers and values as rows. Below is desired output of power query. The query currently is combining the multiple spreadsheets/tables into one and I have so far tried

What is the difference between [column] and Table.Column(Table, “column”) in M/PowerBI/PowerQuery

99封情书 提交于 2021-02-05 08:00:47
问题 Ciao there! I have a problem with a difference between [column] and Table.Column(Table, "column") in M/PowerBI/PowerQuery. Example Table: '#____column 1_______a 2_______b 3_______c Desired Result: '#____column 1_______TEST 2_______TEST 3_______TEST So, I currently have the following code: = Table.ReplaceValue(PrevQueryTable, each Table.Column(PrevQueryTable, "column"), "TEST", Replacer.ReplaceValue, {"column"}) which does not work. Result: '#____column 1_______a 2_______b 3_______c This