I'm having a challenge resolving a formula in a custom column. Expression.Error: The name 'Range' wasn't recognized. Make sure it's spelled correctly.
Power Query Custom Column
-
- GoldLounger
- Posts: 2628
- Joined: 26 Jan 2010, 16:31
- Location: Southern California
Power Query Custom Column
You do not have the required permissions to view the files attached to this post.
Regards,
John
John
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Power Query Custom Column
Hi John.
That is not a valid formula in PQ.
No Range function exists in PQ and the syntax is also incorrect. You cannot refer to a field in double quotes.
Can you either give more details about what you are trying to calculate or provide a sample workbook that contains source data and your query so I can understand the content of this calculation and assist.
TX.
That is not a valid formula in PQ.
No Range function exists in PQ and the syntax is also incorrect. You cannot refer to a field in double quotes.
Can you either give more details about what you are trying to calculate or provide a sample workbook that contains source data and your query so I can understand the content of this calculation and assist.
TX.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- GoldLounger
- Posts: 2628
- Joined: 26 Jan 2010, 16:31
- Location: Southern California
Re: Power Query Custom Column
Rudi,
I came to the conclusion that a Range function did not exist in PQ. What works is ...
PQ is very versatile and thank you for mentioning it in one of your previous posts.
I came to the conclusion that a Range function did not exist in PQ. What works is ...
Code: Select all
Sheets("Sheet1").ListObjects("MyTable").DataBodyRange.Columns(1).Resize(, 1) = Range("R_Month")
Regards,
John
John
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Power Query Custom Column
Hi John,
Glad to hear your comments on PQ. It is a great product.
I am a bit confused though as the code you post has nothing to do with PQ. This is a VBA code.
It seems your question is resolved, so no need to add anything more from my side.
Glad to hear your comments on PQ. It is a great product.
I am a bit confused though as the code you post has nothing to do with PQ. This is a VBA code.
It seems your question is resolved, so no need to add anything more from my side.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- GoldLounger
- Posts: 2628
- Joined: 26 Jan 2010, 16:31
- Location: Southern California
Re: Power Query Custom Column
Rudi,
Since there is no Range function in PQ there is nothing else you need to do on your side. I went with a VBA solution which in the end updated the appropriate table records.
Since there is no Range function in PQ there is nothing else you need to do on your side. I went with a VBA solution which in the end updated the appropriate table records.
Regards,
John
John
-
- 5StarLounger
- Posts: 817
- Joined: 24 Jan 2010, 15:56
Re: Power Query Custom Column
I suspect you could achieve the relevant effect in PQ directly but, as Rudi said, you'd need to provide a workbook so we can see what's going on.
Regards,
Rory
Rory
-
- GoldLounger
- Posts: 2628
- Joined: 26 Jan 2010, 16:31
- Location: Southern California
Re: Power Query Custom Column
Rory/Rudi,
Here is a sample workbook and flat file for the table. I have included notes within the workbook.
Here is a sample workbook and flat file for the table. I have included notes within the workbook.
You do not have the required permissions to view the files attached to this post.
Regards,
John
John
-
- 5StarLounger
- Posts: 817
- Joined: 24 Jan 2010, 15:56
Re: Power Query Custom Column
You can create a new query that just returns the range using:
= Excel.CurrentWorkbook(){[Name="R_Month"]}[Content]
and call it say Range.
Then create a custom column in your existing query using just =Range as the formula, then expand the table.
= Excel.CurrentWorkbook(){[Name="R_Month"]}[Content]
and call it say Range.
Then create a custom column in your existing query using just =Range as the formula, then expand the table.
Regards,
Rory
Rory
-
- GoldLounger
- Posts: 2628
- Joined: 26 Jan 2010, 16:31
- Location: Southern California
Re: Power Query Custom Column
Thank you Rory!
I got it to work with one minor modification to the custom column which I added to the existing query.
Range = New query named "Range"
[Month] = Field heading in query
{0} = 1st record in query connection results.
I got it to work with one minor modification to the custom column which I added to the existing query.
Range = New query named "Range"
[Month] = Field heading in query
{0} = 1st record in query connection results.
You do not have the required permissions to view the files attached to this post.
Regards,
John
John
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Power Query Custom Column
Glad its working John.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.