I'm using "SQL Server" for Power BI as a source of data. The problem is to convert this back to date on Power BI side.
I’m getting the following message:
Expression.Error: We cannot convert the value " 1205751600" to type Number.
Details:
Value= 1205751600
Type=Type
There's a space at the front of the string: " 1205751600". The value should be trimmed first, eg with Text.Trim or Text.TrimStart
Related
I am having troubles converting this fields into date.
Any thoughts on this?
The other dates are wrong, too:
11/7/2022 should be 2022-11-07, not 2022-07-11,
because
1/16/2023 must be a US date format MM/DD/YYYY
(there is no 16th month)
You can convert the string in Power BI "Using Locale ..." and then specifying English/US.
I'm trying to Add Custom Column in Power Query with the objective to return a Table from a List of dates.
The syntax used is as follows below:
= Table.AddColumn(TypeDate, "AddTable", each Table.FromList(
List.Dates([Date_begin],1,#duration(1,0,0,0)
)))
where:
TypeDate is the name of last step in Power Query
"AddTable" is the name of added custom column
[Date_begin] is a column with dates to be considered as the start of my list
Although the syntax seems correct, Power Query returns an error described as follows:
Expression.Error: We could not convert the value #date(2021, 1, 1) on to Text.
Details:
Value=01/01/2021
Type=[Type]
Does anyone know how to handle this problem?
I'll show an image where Power Query shows the error.
Select here to see Power Query interface
Your question is unclear
You want to add a column that has a table of dates for each row, using Date_Begin and Mes_Final?
#"Added Custom" = Table.AddColumn(TypeDate, "AddTable", each Table.TransformColumnTypes(Table.FromList({Number.From([Date_Begin])..Number.From([Mes_Final])}, Splitter.SplitByNothing(), {"date"}),{{"date", type date}}))
I'm new to Power BI, and I have this error when I try to "Remove Empty".
This initial column was a List and then I expanded it with "Expand To new Rows" option .
The error message is:
"We cannot convert the value "I" to type Record. "
Details:
Value=I
Type=[Type]
Thank for your help.
This image summarizes the steps I follow until I have the error
I exported a column that represents the date in the format of yyyymmdd into Power BI. However, when I tried to change the data type to "Date", it shows an error. Currently the yyyymmdd is being read as a whole number but I would like to change it. Is there a way to do this?
I have tried changing the data type to "Date" but it shows as an error.
The expected result would be where the data type is changed from "whole number" to "Date"
Transform your column, using:
= Table.TransformColumns(Source, {{"MyColumn", each Date.FromText(Text.From(_)), type date}})
I send a json with random temperature to Power BI:
[
{
"CPU_Temp" :"12",
"CPU_TempMin" :0,
"CPU_TempMax" :100,
}
]
Then I want to display current CPU data in tachometer (custom Power BI visual)
I use CPU_TempMin for "Start Value", CPU_TempMax for "End Value", CPU_Temp for "Value".
I convert CPU_Temp to a string before sending it to get rid of aggregation on Power BI end (I don't need SUM, AVG etc) but it doesn't have an option for "Don't summarize".
I've checked all the gauges and neither of them has such an option.
Well,
I found the way to "avoid" aggregating functions.
Set all the values that you use(Start Value, End Value, Target Value etc) to AVG (average)
I need to add filter: drag into filters the CPU_Temp field
Than select Top N filter, type '1'
Drag Any Datetime field (you must have it in your JSON) to "By value", select Latest.
Eventually we display Average value calculate from 1 latest value, which is obviously equal to this latest value.