Showing results for 
Search instead for 
Did you mean: 
Level: Power Up

Displaying series in a Line Chart/Adding series to a Line Chart (Filtering a Line Chart)

Hello,  I am trying to generate a single screen with a drop down menu and a line chart.  When the user selects the value in the dropdown, I would like to have the line chart display the data in the series of that selection.  I can't seem to get the filtering correct or the table structure and I keep having issues.  For this I have created 3 tables.


Table 1- Raw Data

Table 2 - List of Series Names (Dropdown Options)

Table 3 - Transposed Data Removed additional rows  (Table 2 is top row transposed)


The way my data looks like:


Table 1 - 


          z1     z2      z3     x1     x2      x3     x4

ser1   i11    i21    i31    y11   y12   y13   y14

ser2  ...




table 2







Now with table 3 has each series with Row A as the series name, I dropped the rows that are not relevant for the chart (z1, z2, ..., )  so now it looks like this:


xs    ser1   ser2    ser3    ser4  

x1     y11   y21     y31    y41  

x2     y12    y22    y32    y42 

x3     y13    y23    y33    y43

x4     y14    y24    y34    y44  


What I am trying to make now is a dropdown that uses the values in Table2, and chooses which series to plot on the chart using the data in table 3 (or table 1 if that is possible but I couldn't get it to do anything with the uselss text fields in it).   In the doucmentation it said I need to use transposed series which left me where I am.  


The logic I have already tried to add is for the filter of the table but doesn't work when transposed.  



Data > Items: Table2

    Value > Series

OnChange > Set(series, Dropdown1.Selected.Series)



Data > Items:  Filter(Table3, Dropdown1.Selected.Series = series

Labels = xs

Series1 dropdown can't be modified except to manually select a different series, cannot add logic here.



Other things I have tried but couldn't figure out:  

OnChange - Set(CompositeLineChart1.LineChart1.Series1, Dropdown1.Selected.Series)



I was able to successfully get the dropdown to work for up to 9 series' by using the function:


Filter(Table3,Dropdown1.Selected.Series exactin Table2.'Series') the problem is this only works for the first 9 series that are populated into my chart since the series fields are protected.  


Does anyone know the basics of creating a PivotChart in Powerapps?

Level 8

Re: Displaying series in a Line Chart/Adding series to a Line Chart (Filtering a Line Chart)

Can you use the third table directly from the data source side?