cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MaxDonen
Level: Powered On

Convert table values to number

Apologies if this has been answered, but I have searched thoroughly with no apparent success. 

 

I have created a collection, 'Col_bubbledata', with a series of values which are needed as Y co-ordinates for positioning circles on a canvas. The values are entered into the column 'Y co-ordinate'. 

 

Entering the following formula within the circle's 'Y' property (under the 'advanced' tab on the right hand side of the GUI) results in an 'Expected Number value' error:

 

Col_Bubbledata.'Y co-ordinate' 

 

Reviewing the diagnostics tab, I am told "The rule produces table values which are incompatible". 

 

I have tried using the value() and text(value()) functions to convert the table values to number values, with no success.  What's the correct approach here? Is it even possible to do this? 

 

(If it's relevant, I am using @davidni's scatterplot creation method, and this is a workaround to create a best fit line. I do of course appreciate that this is not an ideal situation, but I need to create the scatterplot within powerapps as my company has no powerBI (or any alternative method of) access for this application. I am extremely grateful to David for his contributions here, and for the guidance he has given me previously.) 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Convert table values to number

Hi @MaxDonen 

The Y property of the circle control requires a single numeric value.

Col_Bubbledata is a collection of records. As an example, let's imagine that Col_Bubbledata contains 3 records. If we were to use the syntax Col_Bubbledata.'Y co-ordinate', which one of these 3 rows are we referring to ? It's this ambiguity that produces the error "The rule produces table values which are incompatible".

David's scatterplot technique uses a gallery control - a control that binds to multiple records. Within a gallery control, there's an item template. The contents of this item template will repeat for each row in the collection.

Thefore if you were to add a gallery control, add your circle control inside the item template, and set the Y property so that it refers to ThisItem like so...

ThisItem.'Y co-ordinate'

that should hopefully set you on the right track. You'll need to implement some of the other nuances that David describes in his post, but this would at least solve this particular error message.

https://blogs.msdn.microsoft.com/davidni/2017/05/25/scatter-plots-in-powerapps-using-a-gallery-contr...

Hope that's of some help to you.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Convert table values to number

Hi @MaxDonen 

The Y property of the circle control requires a single numeric value.

Col_Bubbledata is a collection of records. As an example, let's imagine that Col_Bubbledata contains 3 records. If we were to use the syntax Col_Bubbledata.'Y co-ordinate', which one of these 3 rows are we referring to ? It's this ambiguity that produces the error "The rule produces table values which are incompatible".

David's scatterplot technique uses a gallery control - a control that binds to multiple records. Within a gallery control, there's an item template. The contents of this item template will repeat for each row in the collection.

Thefore if you were to add a gallery control, add your circle control inside the item template, and set the Y property so that it refers to ThisItem like so...

ThisItem.'Y co-ordinate'

that should hopefully set you on the right track. You'll need to implement some of the other nuances that David describes in his post, but this would at least solve this particular error message.

https://blogs.msdn.microsoft.com/davidni/2017/05/25/scatter-plots-in-powerapps-using-a-gallery-contr...

Hope that's of some help to you.

View solution in original post

MaxDonen
Level: Powered On

Re: Convert table values to number

Thanks. Adding a new gallery overlaid on the original gallery, and setting the second gallery's control to the desired collection solved the issue. Much appreciated!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (3,887)