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 / Power apps pie chart d...
Power Apps
Answered

Power apps pie chart dynamically control based on choice combo box option

(0) ShareShare
ReportReport
Posted on by 94

Hi Community,

 

Good Day,

 

I'm seeking help for one of my projects where I'm representing the Task tracker status in a pie chart from power apps. Currently, I have a working code that filters based on date range however I have added a combo box control to the same code which is placed in the items property of the pie chart as the working code doesn't display the data based on choices (Open, Closed, Cancelled).

below is my code where I have added the additional schema to filter based on choice the entire code has one error as highlighted 

which shows the error as below 

 

vrevankar_0-1695352976151.png

error screenshot

 

vrevankar_1-1695353029474.png

Combox 

vrevankar_2-1695353086509.png

Items property of this is set to 

Distinct(CollListColumns, field_10)
 
Please help to correct the code and provide a solution thanks in advance 🙂

 

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,968 Super User 2026 Season 2 on at

    Hello,

     

    Hello,

     

    What is Field_10? A choice? 

    Is it a multi-select or a single? (if its a choice)

    If its a Choice, why are you populating it the way you are versus 

    Choices(DataSource.ChoicesColumn)?

     


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

     

     

  • vrevankar Profile Picture
    94 on at

    Hi @FLMike 

     

    Yes field_10 is a choice column that I have added to dynamically change the choice need your help with the code 

    vrevankar_0-1695361530103.png

    Don't have this option in preview mode to select 

     

    working one 

     AddColumns( GroupBy( AddColumns( Filter
    ( CollListColumns,
    field_1 >= DatePickerFrm.SelectedDate&& field_1 <= DatePickertwo.SelectedDate ),
    "Vfield_10", field_10.Value,
    "Vfield_3", field_3.Value ),
    "Vfield_3", "Group" ),
    "Closed",
    CountRows(Filter(Group,Vfield_10="Closed")),
    "Open",
    CountRows(Filter(Group,Vfield_10="Open")),
    "Cancelled",
    CountRows(Filter(Group,Vfield_10="Cancelled")) )
    Please help thanks in advance 
     
  • vrevankar Profile Picture
    94 on at

    Hi Community,

     

    Please help 

  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 2 on at

    Hi @vrevankar ,

     

    In your formula, try adding .Value after field_10:

     

    field_10.Value = Combobox1.Selected.Value
  • vrevankar Profile Picture
    94 on at

    @BCBuizer Thanks for that suggestion sir the code has no error after adding as below

    vrevankar_1-1695531757143.png

    but while making a selection from the dropdown seems it displays only one value (closed) but not for open and Cancelled 

    vrevankar_2-1695531831458.png

    not sure if is it because of this field in the advanced following field in advanced 

    vrevankar_3-1695531976156.png

     

    Please suggest Thanks in advance 

  • Verified answer
    BCBuizer Profile Picture
    22,833 Super User 2026 Season 2 on at

    Hi @vrevankar ,

     

    In case you wish to show the number of items that match the selected value in the combobox, simply add a single column to the data that has the number of rows in the grouped data:

    AddColumns( 	
    	GroupBy( 
    		AddColumns( 
    			Filter( 
    				CollListColumns,
    				field_1 >= DatePickerFrm.SelectedDate && field_1.Value <= DatePickertwo.SelectedDate,
    				IsBlank(ComboBox1.Selected.Value) || field_10.Value = ComboBox1.Selected.Value
    			),
    			"Vfield_10", 
    			field_10.Value,
    			"Vfield_3", 
    			field_3.Value 
    		),
    		"Vfield_3", 
    		"Group" 
    	),
    	"StatusCount",
    	CountRows(Group)
    )
    

    Since the grouped data is already filtered, there is no need to add separate columns (=series) for each possible value. 

  • vrevankar Profile Picture
    94 on at

    @BCBuizer Kudos sir perfect Hatt's off for the help 🙂

  • SukhpreetK Profile Picture
    2 on at

    This is great. How can I add count or percentage as well?

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard