Pie Chart with two different categories

Hi,


Does anybody knows if it´s possible to create just one pie chart with two conditions?

For example in case above, I would like two have only one chart that changes when I categorize the table. A chart with the share of field "country", but if i apply category it changes to "Status".

Many thanks!

MacBook Air 13″, macOS 11.2

Posted on Oct 2, 2021 3:56 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 2, 2021 5:25 AM

After it is set up, you can move Tables 2 and 3 to another sheet, out of the way.


It would probably be better to not rely of categorized vs uncategorized and instead you manually choose which chart you want.



Table 4 is a popup with the choice of Status or Country

Table 3 A1 =IF(Table 4::A1="Status",TRUE,FALSE)

All else is the same

3 replies
Question marked as Top-ranking reply

Oct 2, 2021 5:25 AM in response to Badunit

After it is set up, you can move Tables 2 and 3 to another sheet, out of the way.


It would probably be better to not rely of categorized vs uncategorized and instead you manually choose which chart you want.



Table 4 is a popup with the choice of Status or Country

Table 3 A1 =IF(Table 4::A1="Status",TRUE,FALSE)

All else is the same

Oct 2, 2021 5:16 AM in response to TakeshiGarcía

It is possible but I don't know how well it will hold up or what might break it. Below is a rough idea. It can probably be cleaned up and made better but it shows a way to do it. A more robust way would be to have a checkbox to switch the chart vs what I did in Table 3 that looks for a cell that is only there when categories is on.




Create Table 2 with categories OFF on Table 1

Columns A and C are text, not formulas. Fill in blank rows with two dashes, --

B2 =SUMIF(Table 1::A,A2,Table 1::C)

D2 =XLOOKUP(C2,Table 1::B,Table 1::C,"",0)

Fill down with both to complete those columns

I am assuming Table 1 has only one entry for each country so it is a simple lookup to get the value.


Create Table 3 with Categories ON on Table 1

In the screenshots there is a filter on Table 3. Make the table the same number of rows as Table 2

A1 =IFERROR(IF(Table 1::$B $PARTIAL (No Summary)="",TRUE,""),FALSE)

A2 =IF(A$1,Table 2::A2,Table 2::C2)&""

B2 =IF(A$1,Table 2::B,Table 2::D)

Fill down to last row with A2 and B2 to complete the columns

Create your pie chart using all data rows in this table, including all the rows with dashes.

Put a filter on Table 3 to "show rows where text is not --"

The pie chart should ignore all the "--" rows by default (it is a setting in the Chart format)



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Pie Chart with two different categories

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.