Hello
I use the following to insert an empty row in a table regardless of the columns it may have:
However, I get the error:
OLE DB or ODBC error: Type mismatch.
Any idea how to fix that?
Thanks
Hello
I use the following to insert an empty row in a table regardless of the columns it may have:
However, I get the error:
OLE DB or ODBC error: Type mismatch.
Any idea how to fix that?
Thanks
Hey guys,
I Have a list of unsorted weeks, here is an example:
02/08 - 08/08
06/09 - 12/09
09/08 - 15/08
13/09 - 19/09
16/08 - 22/08
23/08 - 29/08
26/07 - 01/08
30/08 - 05/09
I want to pivot the column to make the list the headers, and after that I want to sort them ascending by the dates.
How you will recommend to sort them? Thanks!
Hi,
I have an Amount column that also have some null's.
I'm using this expression to create a new column:
= Table.AddColumn(#"Expanded Table", "Selected", each if [Amount USD] < 50000 and [Company] = "A" then "Yes" else if [Amount USD] is null and [Company] = "A" then "Yes" else "No")
The resulting column is giving me errors whenever there was a null of the Amount USD Column.
Appreciate your help,
Guillermo
I have the below custom column in the query editor, where the source is a table with text data and then 2 columns are created upon this.
I need to change the source to the table 'rel' and the column 'Score'. No matter what youtube tutorials or format changes i try i keep getting errors.
Would some one be able to help amend the syntax to use the source table and column above where applicable?
let
Source = #table(
{"Column1"},
List.Zip(
{{
"Call me on 08588812885",
"Call me on 07525812845",
"I need assitance please call me",
"Last tried in 2019"
}}
)
),
#"Added Custom" = Table.AddColumn(Source, "Custom", each Text.Split([Column1], " ")),
#"Added Custom1" = Table.AddColumn(
#"Added Custom",
"Custom.1",
each Text.Combine(
List.Select(
[Custom],
(l) => [
ListOfCharacters = Text.ToList(l),
Result = not (List.Count(ListOfCharacters) >= 10
and List.AllTrue(
List.Transform(ListOfCharacters, (x) => List.Contains({"0".."9"}, x))
)
)][Result]
), " ")
)
in
#"Added Custom1"
Hi there, I am new to Power BI and do need some help on how to link a slicer from TableA to TableB. Basically, the slicer is coming from Type column from TableA. What I need is when the user select an option as FY1 or FY2, TableB will be filtered by matching their ID. For example, when FY1 is selected, the TableB will be filtered as
1 10
1 20
2 30
2 10
Join TableA and TableB does not work, as ID are not unique is either A or B.
The goal to get the sum of 10,20,30,10 when FY1 is selected, or 5,5,20,10 when FY2 is selected.
Any help is greatly appreciated.
Hi,
I have the following Input table(see pic below) and I'd like to have it in the format shown in Output table. How do I parse the column FruitsQuantity taking into account there can the N occurences(\Fruit\Quantity) per person.
Thanks!
Hi guys I am getiing an error as the only element in my list. Everything goes right untill the last step when i change it to list
let
Origen = Excel.Workbook(Web.Contents("https://.....xlsx"), null, true),
filtro_Sheet = Origen{[Item="cuenta",Kind="Sheet"]}[Data],
#"Encabezados promovidos" = Table.PromoteHeaders(filtro_Sheet, [PromoteAllScalars=true]),
#"Tipo cambiado" = Table.TransformColumnTypes(#"Encabezados promovidos",{{"cuenta", Int64.Type}}),
#"Duplicados quitados" = Table.Distinct(#"Tipo cambiado"),
Personalizado1 = Table.ToList(#"Duplicados quitados")
in
Personalizado1
Good day,
I am encountering an issue which I cannot figure out by myself. Hopefully one of you can help me 😀
From an excel file, I extract tasks and their respective start- and end date/time columns (see example below). These can range from times within the same day, but also span multiple days. However, for each task I need to have the time span per day in which the task is “active” ranging from 00:00:00 until 23:59:59 (see example for better understanding).
TABLE1 (start situation)
Task | Start Date/Time | End Date/Time |
1 | 14/09/2020 14:00:00 | 14/09/2020 16:00:00 |
2 | 14/09/2020 14:00:00 | 15/09/2020 16:00:00 |
3 | 14/09/2020 14:00:00 | 18/09/2020 16:00:00 |
Table 1: (needed situation)
Task | Start Date/Time | End Date/Time |
1 | 14/09/2020 14:00:00 | 14/09/2020 16:00:00 |
2 | 14/09/2020 14:00:00 | 14/09/2020 23:59:59 |
2 | 15/09/2020 00:00:00 | 15/09/2020 16:00:00 |
3 | 14/09/2020 14:00:00 | 14/09/2020 23:59:59 |
3 | 15/09/2020 00:00:00 | 15/09/2020 23:59:59 |
3 | 16/09/2020 00:00:00 | 16/09/2020 23:59:59 |
3 | 17/09/2020 00:00:00 | 17/09/2020 23:59:59 |
3 | 18/09/2020 00:00:00 | 18/09/2020 16:00:00 |
I currently do this with a function but it takes forever (i.e. hours) to load it like this and the loading window shows a much higher number of MBs than the size of the actual Excel file. In the end, I end up with a table of appr. 900K lines.
Thank you in advance!
Hi all,
I have searched this error and I see lots of solutions pointing to excel file names, but in my case I beleive my issue is on the D365 Business Central side. I have a report connected to D365 Business Central and I am getting this error all of a sudden. Could MS have done an update overnight to cause me the need to re-define the source?
One evening I refreshed just fine, and then in the morning I went to refresh and got this error when I went in to the query builder this is the error I see...
Hey everyone,
So initally i had two time values, which was StartTime and EndTime and right now I got the duration between both as one column, but in the duration format. The problem is, I can't figure out how to make it as a decimal or whole number, so I could display it as a sum in histogram. The closest I got to this is take duration as total hours, however, I need precise time to be displayed in the histogram as a value. Any ideas?
Im not sure if it is just on my pc but Ive noticed the SQL window became uncharacterictically small to the point where looking at the query in there becomes impossible.
The whole window is not sizeable so I cant see a way to resize and make readeable. Is this a bug which needs fixing with a new update or is there a way for me to correct it.
PS:The window is from IBM Db2 database.
But this result seems strange only to me?
For the moment I do not exploit what does not fit me.
I would like to see if anyone else has the same impression as me.
Hello,
I'm using Tabular 1400 for the data model.
I'm trying to merge two tables on values that do not 100% match. One table has a segment of the string from that other table I'm trying to merge.
I tried using fuzzy but we're talking over 100 million rows, not sure if it's the best for performance.
The goal is to normalize values in the main table by finding key substring within those values. I hope this makes sense.
Hi, I am trying to merge 2 inventory files using the item code. One of the queries has spaces after the item code, so I have both cleaned and trimmed the column. But it doesn't seem to make any difference - I end up with many item codes that are not found, and when I look at the final query, it is obvious that it isn't working because the one inventory code has these spaces after it and that is affecting the merge.
But other than going to my source file, and removing the spaces there, which for obvious reasons I want to avoid, how do I get rid of these things?
and
I've followed, the need to make comparisons between a text string and a pattern, as does the VLOOKUP function, has emerged.
Hello Everyone
I have a file where we write down service durations we process for each customer. My goal is to sum up all durations for each customer and visualize these service durations with the format [hh]:mm. Works fine if I try this with Pivot, can't get it to work in Power Query / Power BI.
Example:
Customer | Service Time |
A | 80:20 |
B | 71:45 |
C | 53:30 |
D | 20:24 |
E | 05:59 |
Right now it shows these values in decimals, like this:
Customer | Service Time |
A | 3.35 |
B | 2.99 |
C | 2.23 |
D | 0.85 |
E | 0.25 |
Maybe someone has aaaa solution for this case?
Regards
Sandro
I am trying to combine multiple pages from the UK coronavirus data link here for more information. I have both a function and table setup to try and extract the data from the API query. I am using the table to define which page each request should be refering to and the function to send the URL to the table for drilling down into the data.
Code for function:
(params as text) =>
let
source = Web.Contents("https://api.coronavirus.data.gov.uk/v1/data?" & "filters=areaType=utla&structure={""areaType"":""areaType"",""areaName"":""areaName"",""areaCode"":""areaCode"",""date"":""date"",""newCasesBySpecimenDate"":""newCasesBySpecimenDate"",""cumCasesBySpecimenDate"":""cumCasesBySpecimenDate""}&format=json&page=" & params)
in
source
Code for table:
let
Source = Json.Document(Web.Contents("https://api.coronavirus.data.gov.uk/v1/data?" & "filters=areaType=utla&structure={""areaType"":""areaType"",""areaName"":""areaName"",""areaCode"":""areaCode"",""date"":""date"",""newCasesBySpecimenDate"":""newCasesBySpecimenDate"",""cumCasesBySpecimenDate"":""cumCasesBySpecimenDate""}&format=json")),
pagination = Source[pagination],
totpages = pagination[last],
newvalue = Replacer.ReplaceText(totpages, "/v1/data?filters=areaType=utla&structure=%7B%22areaType%22:%22areaType%22,%22areaName%22:%22areaName%22,%22areaCode%22:%22areaCode%22,%22date%22:%22date%22,%22newCasesBySpecimenDate%22:%22newCasesBySpecimenDate%22,%22cumCasesBySpecimenDate%22:%22cumCasesBySpecimenDate%22%7D&format=json&page=", ""),
newvalue2 = Number.FromText(newvalue),
List = {1..newvalue2},
#"Converted to Table" = Table.FromList(List, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "List"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"List", type text}}),
#"Invoked Custom Function" = Table.AddColumn(#"Changed Type", "Function", each Function([List])),
Function1 = #"Invoked Custom Function"{0}[Function], //this is where I think the issue is as this will only show the first page
#"Imported JSON" = Json.Document(Function1,65001),
data = #"Imported JSON"[data],
#"Converted to Table1" = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table1", "Column1", {"areaType", "areaName", "areaCode", "date", "newCasesBySpecimenDate", "cumCasesBySpecimenDate"}, {"Column1.areaType", "Column1.areaName", "Column1.areaCode", "Column1.date", "Column1.newCasesBySpecimenDate", "Column1.cumCasesBySpecimenDate"})
in
#"Expanded Column1"
The issue I am having is that only the first record (page 1) is showing in the output that I require and I want to extract all into one table!
Any help would be amazing!
Anthony
Hi All,
I am facing an isssue with the filled map.
As, I am adding countries to the map it is showing duplicate contnents.
Attaching Screenshot for the following:
As, you can see Asia is coming twice.
Can you please help me out with this.
Thanks.
Hi,
I have date in excel where my dates aare my column headers- ed, Apr-20, MAy-20, etc. Now when I import my data in Power BI the headers are changed to text. But I need them to stay in date format as I need to show the change of month over month .
Pls help!
Dear all,
i'm currently confronted with a pagination issue when getting data from a REST Apo.
When querying the REST API with a custom query i get the total of pages in return, but the query is repeating the data from the first page, and it doesn't return fetch the data from the others pages.
The custom query im using
let
BaseUrl = "--",
Token = "--",
EntitiesPerPage = 50,
GetJson = (Url) =>
let
Options = [Headers=[access_token="--", Accept="--", #"Content-Type"="--"]],
RawData = Web.Contents(BaseUrl, Options),
Json = Json.Document(RawData)
in Json,
GetEntityCount = () =>
let Url = BaseUrl & "$count=true&$top=0",
Json = GetJson(Url),
Count = Json[#"count"]
in Count,
GetPage = (Index) =>
let Skip = "$offset=" & Text.From(Index * EntitiesPerPage),
Url = BaseUrl & Skip,
Json = GetJson(Url),
Value = Json[#"items"]
in Value,
EntityCount = List.Max({ EntitiesPerPage, GetEntityCount() }),
PageCount = Number.RoundUp(EntityCount / EntitiesPerPage),
PageIndices = { 0 .. PageCount - 1 },
Pages = List.Transform(PageIndices, each GetPage(_)),
#"Converted to Table" = Table.FromList(Pages, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandListColumn(#"Converted to Table", "Column1"),
#"Expanded Column2" = Table.ExpandRecordColumn(#"Expanded Column1", "Column1", {"href", "id", "firstName", "lastName"}, {"Column1.href", "Column1.id", "Column1.firstName"})
in
#"Expanded Column2"
I'm a newbie in Power Query so kindly ask your support & suggestions on how to resolve this issue.