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 / Help Creating Column C...
Power Apps
Unanswered

Help Creating Column Chart from Choice

(0) ShareShare
ReportReport
Posted on by

Hi Everyone,

 

I am trying to create a column chart that displays the number lab test submissions that request a particular test. This information is being pulled from a column in Sharepoint called TestNeeded that is a choice field that allows multiple options to be selected. Below is the code that I am using in the Items section for the bar chart but doesn't seem to be working. I get an error stating "Expected a text, numeric, boolean, or date/time value". Any ideas on what I might be doing wrong?

 

AddColumns(GroupBy(AddColumns(QualityLabDashboard,"SelectedTest",TestNeeded.Value),"SelectedTest","TestNeededList"),"TestNeeded",CountRows(TestNeededList))

 

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    v-yutliu-msft Profile Picture
    on at

    Hi @Anonymous ,

    The reason why you met this problem is that:

     TestNeeded that is a choice field that allows multiple options .

    Since it allows multiple options, one TestNeeded will represents a table.

    So "TestNeeded.Value" will represent a table instead of a value.

    Try this formula:

    AddColumns(
     GroupBy(
     AddColumns(
     QualityLabDashboard,"SelectedTest",Concat(TestNeeded,Value&",")
     ),
     "SelectedTest","TestNeededList"
     ),CountRows(TestNeededList))
    

    The key point is to use "Concat(TestNeeded,Value&",")" to represent the value in TestNeeded field.

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    on at

    Hi @v-yutliu-msft,

     

    Thank you for your advice! Your code helped out a lot! It didn't work immediately because of an error with count rows but it was just missing the "Test Needed" before the CountRows function. Adding that and it worked perfectly!

    AddColumns(
     GroupBy(
     AddColumns(
     QualityLabDashboard,"SelectedTest",Concat(TestNeeded,Value&",")
     ),
     "SelectedTest","TestNeededList"
     ),"Test Needed",CountRows(TestNeededList))

     

  • v-yutliu-msft Profile Picture
    on at

    Hi @Anonymous ,

    Yes, I forgot that parameter!🤣

    Do you have any other problem?

    If not, could you mark my answer as your solution?

    Thanks!

     

     

    Best regards,

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard