Forum Discussion
Can not convert the value to type Table.
Guys,
I have merged to tables together and I tryied to get the value from the second table based on date range.
However i m getting an error of "We cannot convert the value 5.5 to type Table". The number "5.5" seems to be the corrected value i want to get.
Code:
#"Added Custom1" = Table.AddColumn(#"Expanded Price List", "Custom", each Table.SelectRows([Price List.Tarief],each [Date] >= [Price List.SDate] and [Date] <=[Price List.EDate])),
Any ideas what i m losing?
1 Reply
- lbendlin
Super User
[Price List.Tarief]is a column, not a table. Your Table.SelectRows likely needs to first reference a previous step, and then you need to append the column name and {0} to it to grab the first value.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523