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

Notifications

Announcements

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
    153,051 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard