cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fd00094
Helper III
Helper III

Pie chart support

Need help with creation of pie chart

 

I have SharePoint list with Below column:

1. Read = Yes/No

2. Ack = Yes/No

3. Closed = Yes/No(True/False)

 

I want pie chart which will display all 3 columns as percentage or count.

 

Please help as soon as possible. 

1 ACCEPTED SOLUTION

Accepted Solutions

@fd00094 
You are clearly adept at this so I will show you how to make the Acknowledgments chart and you can do the rest 😀

 

We need to add an additional column to the collection.  Use this modified code for Acknowledgments.

AddColumns(
    AddColumns(
        GroupBy(
            Filter('Task Tracker',Title='Document Title'.Selected.Result),
            "Acknowledge_x0020_By_x0020_Me",
            "ByAck"),
        "AckCount",
        CountRows(ByAck),
    "ChartLabel",
    'Acknowledge By Me'& ": " & AckCount
)



To show the correct label simply change the Labels property to 'ChartLabel'.  (My picture has the wrong name, whatever... lol).

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



View solution in original post

12 REPLIES 12
mdevaney
Super User III
Super User III

@fd00094 

Please provide a sample of how the chart should look and the data used to build it.  Pie charts typically only use data from a single column so that's why I don't understand what you need.

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

data.JPG

 

 

@mdevaney  Above is my data
When User click on Title , I want to display Read(True) percentage, Ack(true) % and Isclosed(true) percentage for that particular title in single pie chart is this possible or any alternate suggestion to display this please.

Thanks for Your help.

 

 

 

@fd00094 
Can you please show an example of what the pie chart would look like for this data?

 

Typically, a pie chart would only show data from a single column. (100%)

I cannot picture how a pie chart would calculate the percentages for 3 columns (300%)

 

Thanks in advance 🙂

 

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

Hi,

 

Can you guide me on how to show percentage for single column
eg. for read column , True 60% and False 40%

 

And is it possible to have 3 buttons for Read , Write and Closed and when i click on Read it should display true/false percentage for closed field and selected title in pie chart

@mdevaney  

Thanks

@fd00094 

As you can see from my code below the code is quite complex.  In my opinion, best to get this working for only 1 option and then figure out the final 2. 

 

Please put this code in the OnSelect property on a button and click it to make the collection.  Then place a pie chart on the screen and load the data.  Let me know the result.

 

ClearCollect(
    RenameColumns(
        AddColumns(
            GroupedPieChartData,
            DropColumns(
                AddColumns(
                    GroupBy(your_datasource_name,"Acknowledge","GroupedItems"),
                "Count Value",CountRows(GroupedItems)
                ),
            "GroupedItems"
            ),
        "Percent",
        'Count Value'/CountRows(your_datasource_name)
    ),
    "Acknowldge",
    "Category"
);

 

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

Hi, I will try below solution but for now i have changed my requirement. I will create 3 pie charts for 3 columns and i will show count only, I am bale to achive this using Addcolumns parts only but now my concern is How to rename lables.

I have 2 results Yes and No, it shows count like 1 and 5 with different colour but how to show names along with count.

@mdevaney 

 

And if i changed Pie chart to some other chart like column chart is it possible to show all 3 scenarios.

@fd00094 

Since you have changed direction I would ask that you please share the code you ended up using to create the collection.  I would also like to see a screenshot of the chart so I can visualize what you are talking about.

 

No, there is no chart that will show 'multi-dimensional' data like you are asking for.

 

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

My Formulas
Read : AddColumns(GroupBy(Filter('Task Tracker',Title='Document Title'.Selected.Result),"Read_x0020_By_x0020_Me","ByRead"),"ReadCount",CountRows(ByRead))

 

Ack: AddColumns(GroupBy(Filter('Task Tracker',Title='Document Title'.Selected.Result),"Acknowledge_x0020_By_x0020_Me","ByAck"),"AckCount",CountRows(ByAck))

 

Closed : AddColumns(GroupBy(Filter('Task Tracker',Title='Document Title'.Selected.Result),"IsClosed","ByClosed"),"ClosedCount",CountRows(ByClosed))

 

and chart is dash.JPG

 

Here 5 is NO and 1 is YES

I want to display Labels as Read Yes : 1, Read No : 5  for each and every column

 

@mdevaney 

 

@fd00094 
You are clearly adept at this so I will show you how to make the Acknowledgments chart and you can do the rest 😀

 

We need to add an additional column to the collection.  Use this modified code for Acknowledgments.

AddColumns(
    AddColumns(
        GroupBy(
            Filter('Task Tracker',Title='Document Title'.Selected.Result),
            "Acknowledge_x0020_By_x0020_Me",
            "ByAck"),
        "AckCount",
        CountRows(ByAck),
    "ChartLabel",
    'Acknowledge By Me'& ": " & AckCount
)



To show the correct label simply change the Labels property to 'ChartLabel'.  (My picture has the wrong name, whatever... lol).

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



View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (70,255)