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 / How do I put Gallery d...
Power Apps
Answered

How do I put Gallery data in a Pie Chart

(0) ShareShare
ReportReport
Posted on by 100

Hi There,

 

I have a Gallery on my screen with calculated fiels in each line. 

Example: Number, Price, Value (that's the calculated field)

I would like to show the Value in a Pie Chart, where each line in the Gallery is  a part of the pie.

 

How do I do that?

Thanks in advance, Ron

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @RonHappel 

    I'd be happy to show you how to do it.  I've created a small app as a sample.  See the image below.  My Gallery is called Gallery1 and it has 2 fields: Borrower (text field) and Total Outstanding (calculated field).

     

    app1.PNG

    Click on your chart and Edit the advanced properties on the right-side menu.  Items should be Gallery1.AllItems, Labels should be your category field and Series should your value field.

     

    app2.PNG

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • RonHappel Profile Picture
    100 on at

    Hi,

     

    Thanks for the reply, but I can't get it to work.

    I've connected my screen to this post

     

    My Gallery is Called OmzetGalleryGroep: Items: SortByColumns(Tabel1; "GroepNaam"):

    And consists of:

    . Groep: from the datasource Tabel2

    . Leerkracht: from the datasource Tabel2

    . OmzetGalleryGroepAantal (# strippen on the screen): Default: CountIf(Tabel3;Groep=ThisItem.GroepNaam) 

    . OmzetPerGroep (Omzet on the screen): Default: OmzetGalleryGroepAantal*OmzetStripprijs

    I can't select the field OmzetPerGroep under Series, please refer to the image

    Knipsel.PNG
  • mdevaney Profile Picture
    29,991 Moderator on at
    @RonHappel
    Did you try deleting the chart and recreating it again? Sometimes you must do this for new fields to appear. Don’t know why, but it does... Also you can try refreshing the data source if the column was newly added.

    If that does not work I will try to recreate your scenario in a few hours when my kid takes a nap, lol.

    —-
    Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
  • RonHappel Profile Picture
    100 on at

    Hi,

     

    I did recreate the chart.

    I've refreshed the datasource.

    Please bear in mind that the field to be shown in the pie chart is not part of the datasource. It's calculated when the gallery is shown.

     

    Ron

  • mdevaney Profile Picture
    29,991 Moderator on at

    @RonHappel 

    I've had some more time to review your scenario and now I know why the field is not appearing: you have created labels to show the fields strippen and OmzetPerGroep.  Labels are not included in the Gallery items data so you cannot find them by using Gallery1.AllItems.  Instead we must ADDCOLUMNS to the Items property of the Gallery. 

    Put this code in the Items property of your Gallery to replace SortByColumns(Tabel1; "GroepNaam").  You might have to change the Table or Column names but the basic concept is good.=

     

    SortByColumns(
     AddColumns(
     Tabel2;
     "Strippen"; CountIf(Tabel3; Groep=GroepNaam);
     "Omzet"; CountIf(Tabel3; Groep=GroepNaam) * OmzetStripprijs;
     );
     "GroepNaam"
    )

     

    After you delete and re-add the chart the Columns Strippen and Omzet will appear as options in the Series property.

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • RonHappel Profile Picture
    100 on at

    This looks look a good solution.

    Thank you very much.

    unfortunately I don’t have the time to test this right now.

    I will try it tomorrow and let you know.

     

    Ron

  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at
    @RonHappel
    Sounds good to me. It is the weekend after all. I hope you are finding some time to rest.
  • RonHappel Profile Picture
    100 on at

    Hi,

     

    Great!!

    This works excellent.

    Thanks for your help.

     

    Ron

  • mdevaney Profile Picture
    29,991 Moderator on at

    @RonHappel 

    Awesome.  Thanks for your patience in waiting for a response.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You can add chart item property which one you want to show .

    type-Gallery.Allitems after that you can select the series then you get the result

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 491

#2
WarrenBelz Profile Picture

WarrenBelz 407 Most Valuable Professional

#3
11manish Profile Picture

11manish 331

Last 30 days Overall leaderboard