web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Pull Data and create a...
Power Apps
Unanswered

Pull Data and create a line chart on Button OnSelect

(0) ShareShare
ReportReport
Posted on by 3

Hi everyone, I want to add a button that will Pull data from the already imported table and I want to select three columns to make a line chart of it. Can anyone tell me how can I do this?

Categories:
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    To create a line chart in a canvas app by pulling data from an already imported table and selecting three columns, you can follow these steps:

    1. Insert a button control onto your canvas app screen. You can find the button control in the Power Apps Studio under the Insert tab.

    2. Select the button control, and in the Properties pane, set the OnSelect property to the following formula:

     

    ClearCollect(
     ChartData,
     Table_Name
    );
    Navigate(Screen_Name, ScreenTransition.None)

     

    1. Replace "Table_Name" with the actual name of the table that contains your data, and replace "Screen_Name" with the name of the screen where you want to display the line chart.

      The ClearCollect function is used to populate a collection named "ChartData" with the data from the specified table. This collection will be used as the data source for the line chart.

      The Navigate function is used to navigate to the screen where you want to display the line chart. You can replace "Screen_Name" with the name of your desired screen.

    2. On the screen where you want to display the line chart, insert a line chart control from the Power Apps Studio's Insert tab.

    3. Select the line chart control, and in the Properties pane, set the Items property to the collection "ChartData" that you created in step 2.

    4. Configure the line chart's properties to display the desired columns. In the properties pane, set the following properties:

      • CategoryAxis: Set it to the column that represents the x-axis values.
      • Values: Set it to the columns that represent the y-axis values.
      • Series: Set it to the column that represents the series (if applicable).

      Adjust other properties such as the title, legend, axis labels, etc., according to your preferences.

    5. Preview or publish your app and click the button to pull the data and display the line chart on the designated screen.

    By following these steps, you can create a button that pulls data from a table and displays a line chart based on the selected columns in your canvas app.

  • Itika Profile Picture
    3 on at

    I don't know may be I'm using an older version of Powerapps that's why CategoryAxis, Values aren't visible in my case. But anyways ,thanks @ShaheerAhmad , that was helpful.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard