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 / LineChart ClearCollect...
Power Apps
Answered

LineChart ClearCollect syntax error

(1) ShareShare
ReportReport
Posted on by 492
Greetings
 
I am trying to sort SharePoint Submissions by month and populate a LineChart in Power Apps.
 
This is my syntax and for some reason, it is giving me multiple errors.
 
I have it placed in the properties of Onstart as follows:
 
ClearCollect(CREQE_FormCollection, CREQE_Form);
ClearCollect(
    CREQE_FormWithMonthYear,
    AddColumns(
        CREQE_FormCollection,
        "MonthYear",
        Text('Date of Request', "[$-en-US]yyyy-mm")
    )
);
ClearCollect(
    GroupedData,
    AddColumns(
        GroupBy(
            CREQE_FormWithMonthYear,
            "MonthYear",
            "GroupedItems"
        ),
        "MonthlyTotal",
        Sum(GroupedItems, SubmissionAmount)
    )
);

 
 
Errors are saying invalid names and invalid, arguments; I am so confused right now. Please help me.
 
Thanks
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,127 Most Valuable Professional on at
    You do not need quotes "" around the AddColumns or GroupBy parameters now.
    ClearCollect(CREQE_FormCollection, CREQE_Form);
    ClearCollect(
       CREQE_FormWithMonthYear,
       AddColumns(
          CREQE_FormCollection,
          MonthYear,
          Text('Date of Request', "[$-en-US]yyyy-mm")
       )
    );
    ClearCollect(
       GroupedData,
       AddColumns(
          GroupBy(
             CREQE_FormWithMonthYear,
             MonthYear,
             GroupedItems
          ),
          MonthlyTotal,
          Sum(
             GroupedItems, 
             SubmissionAmount
          )
       )
    );
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • Suggested answer
    NN-21081740-0 Profile Picture
    492 on at
    Thank you so much for removing the quotes around AddColumns and GroupBy parameters. To make it work 100% I needed to add quotes between SubmissionAmount like so: "SubmissionAmount"
     
    Thanks a ton!!!

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard