I would like to know how to control which variables are assigned for the x and y axis values in a line graph?
I know the values can be set manually, if you are not happy with the choice Powerapps made.
I experimented with filtering the data source for the graph and only providing two columns, even this is not sufficient, because now Powerapps assigns the first column to both the 'Labels' and the 'Series1' !!
It is also rather confusing that the variable plotted along the x axis is referred to as 'Labels'.
@Anonymous
There aren't really any variables involved in this scenario. You need to shape your data appropriately in the item property of the chart.
What is your Items property now and what are you trying to achieve from it?
Hello Randy,
The Items property is a Table with a Filter on it. The filtered table has two columns with numeric values.
So the question is, how does PowerApps decide what to assign for the vertical axis and what for the horizontal axis. It is maybe a little bit hard to explain because of the names that are used in PowerApps to refer to particular properties.
Lets say the name of the first column is 'property_a' and the second column is named 'property_b'. How does PowerApps decide to make the line graph. In my first attempt the graph showed 'property_a' as function of 'property_a'. I thought that by reshaping the data to just two columns it would automatically pick 'property_a' as the quantity to show along the horizontal axis ('Labels' it is called in PowerApps) and 'property_b' along the vertical axis 'Series1'
@Anonymous
It really depends on the datatypes of the columns. If property_a is text, then it will be the labels. If property_b is numeric, then it will be the series.
What are the datatypes of the data you have?
But also keeping in mind, your data table should represent the exact information you want charted.
So -
Table({Label: "Label1", Qty:200}, {Label: "Label2", Qty:43}, {Label: "Label3", Qty:87})
Will result in 3 series. The labels will be Label and the Series of each will be Qty
Table({Label: "Label1", Qty1:200, Qty2:43, Qty3:87})
Will result in 3 series. The labels will be Label and the Series will be Qty1, Qty2, and Qty3
Also to note:
Table({Label: "Label1", Qty:100}, {Label: "Label1", Qty:43})
Will result in 2 series, not one! So your data must be grouped and shaped properly.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
198 | |
70 | |
49 | |
42 | |
30 |
User | Count |
---|---|
268 | |
119 | |
98 | |
92 | |
82 |