I'm trying to use Power Query to fill in a list of department numbers and am getting an unfamiliar error.
I have a table with a listing of numbers like this,
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Dept Category[/TD]
[TD]Department Range Start[/TD]
[TD]Department Range End[/TD]
[/TR]
[TR]
[TD]03[/TD]
[TD]300[/TD]
[TD]399[/TD]
[/TR]
[TR]
[TD]04[/TD]
[TD]400[/TD]
[TD]499[/TD]
[/TR]
[TR]
[TD]05[/TD]
[TD]500[/TD]
[TD]599[/TD]
[/TR]
[TR]
[TD]06[/TD]
[TD]600[/TD]
[TD]699[/TD]
[/TR]
</tbody>[/TABLE]
And the ultimate goal is to create a list of values with everything between Start Number and End Number, so for the above, a list of values 300-699.
I'm trying to insert the following calculated column
I get the following error on the row with 300-399 (same error for the others but the Value changes)
Expression.Error: We cannot apply field access to the type Number.
Details:
Value=300
Key=Department Range End
What am I missing here... or is there a better way?
I have a table with a listing of numbers like this,
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Dept Category[/TD]
[TD]Department Range Start[/TD]
[TD]Department Range End[/TD]
[/TR]
[TR]
[TD]03[/TD]
[TD]300[/TD]
[TD]399[/TD]
[/TR]
[TR]
[TD]04[/TD]
[TD]400[/TD]
[TD]499[/TD]
[/TR]
[TR]
[TD]05[/TD]
[TD]500[/TD]
[TD]599[/TD]
[/TR]
[TR]
[TD]06[/TD]
[TD]600[/TD]
[TD]699[/TD]
[/TR]
</tbody>[/TABLE]
And the ultimate goal is to create a list of values with everything between Start Number and End Number, so for the above, a list of values 300-699.
I'm trying to insert the following calculated column
Code:
= Table.AddColumn(#"Changed Type1", "Department Range", each List.Generate( () => [Department Range Start], each _ <= [Department Range End], each _ +1))
I get the following error on the row with 300-399 (same error for the others but the Value changes)
Expression.Error: We cannot apply field access to the type Number.
Details:
Value=300
Key=Department Range End
What am I missing here... or is there a better way?