cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

How do I put Gallery data in a Pie Chart

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: How do I put Gallery data in a Pie Chart

@RonHappel
Sounds good to me. It is the weekend after all. I hope you are finding some time to rest.

View solution in original post

9 REPLIES 9
Highlighted
Super User
Super User

Re: How do I put Gallery data in a Pie Chart

@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."

Highlighted
Resolver I
Resolver I

Re: How do I put Gallery data in a Pie Chart

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

Highlighted
Super User
Super User

Re: How do I put Gallery data in a Pie Chart

@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.
Highlighted
Resolver I
Resolver I

Re: How do I put Gallery data in a Pie Chart

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

Highlighted
Super User
Super User

Re: How do I put Gallery data in a Pie Chart

@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."

Highlighted
Resolver I
Resolver I

Re: How do I put Gallery data in a Pie Chart

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

Highlighted
Super User
Super User

Re: How do I put Gallery data in a Pie Chart

@RonHappel
Sounds good to me. It is the weekend after all. I hope you are finding some time to rest.

View solution in original post

Highlighted
Resolver I
Resolver I

Re: How do I put Gallery data in a Pie Chart

Hi,

 

Great!!

This works excellent.

Thanks for your help.

 

Ron

Highlighted
Super User
Super User

Re: How do I put Gallery data in a Pie Chart

@RonHappel 

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

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,190)