How to conditionally group rows in Apple Numbers on iPhone?

Using Apple Numbers on iPhone, is there a way to categorize and subcategorize (using two category columns) so that rows are (a) grouped based *only* upon CategoryColumn1 values if the corresponding CategoryColumn2 value is blank, and are (b) categorized and subcategorized based upon CategoryColumn1 and CategoryColumn2 *only if* CategoryColumn2 values are not blank?


[Re-Titled by Moderator]

iPhone 16 Plus, iOS 18

Posted on May 24, 2025 5:14 PM

Reply
6 replies

May 25, 2025 8:23 AM in response to TheAppleForumThinker

TheAppleForumThinker wrote:

I posit that the data is not uniform, and that attempt to restructure the data so that category data is uniform (a) would not resolve the report formatting issue, and (b) introduces false data into the dataset.

I welcome your thoughts and questions thereregarding, including to the contrary.


Not sure how having a well formed table with uniformly structured data "introduces false data."


In any case, if you're looking to produce "reports" that apply conditional rules to produce output in a customized format then Numbers (or another spreadsheet app) is not the right tool.


You might have better luck with a database app that can produce customized reports.


SG



May 25, 2025 4:14 AM in response to SGIII

Re:

>Could you show an example of your data and the result you want?


Thanks for responding.


Table

* 3 columns: Name, GroupID1, GroupID2


Data

* Beef, Meat, [blank]

* Chicken, Meat, [blank]

* Fish, Meat, [blank]

* Seafood, Meat, [blank]

* Apple, Vegetation, Fruit

* Orange, Vegetation, Fruit

* Carrot, Vegetation, Vegetable

* Peas, Vegetation, Vegetable


Report

* Meat

    * Beef, Meat, [blank]

    * Chicken, Meat, [blank]

    * Fish, Meat, [blank]

    * Seafood, Meat, [blank]

* Vegetation

    * Fruit

        * Apple, Vegetation, Fruit

        * Orange, Vegetation, Fruit

    * Vegetable

        * Carrot, Vegetation, Vegetable

        * Peas, Vegetation, Vegetable


I respectfully welcome your thoughts and questions.

May 25, 2025 6:45 AM in response to SGIII

Re:

>[If] you want a different result ("report") have you considered restructuring ("cleaning up") your data so that it is uniform?


I posit that the data is not uniform, and that attempt to restructure the data so that category data is uniform (a) would not resolve the report formatting issue, and (b) introduces false data into the dataset.


I welcome your thoughts and questions thereregarding, including to the contrary.

May 25, 2025 9:07 AM in response to SGIII

Re:

>Not sure how having a well formed table with uniformly structured data "introduces false data."


I posit that:

* The way to render the data in question to be uniform is to create a GroupID2 data value for the rows where "Meat" is the GroupID1 data value.

* There is no true, given subcategory for the "Meat" category.

* As a result, establishment of a single, non-empty GroupID2 value (for the rows where "Meat" is the GroupID1 data value) renders that data value to misrepresent the reality, and therefore be false.

* As the data currently stands, a data value already exists: "{empty}".

* Changing the data value to, say, "NoSubGroup" only changes the text used for the subgroup header row.

* The goal is the ability to have Apple Numbers not establish a subgroup (and header row) if all of the data values in a main group rows' subgroup columns match a specific data value, i.e., "{empty}", "NoSubGroup".


Re:

>if you're looking to produce "reports" that apply conditional rules to produce output in a customized format then Numbers (or another spreadsheet app) is not the right tool.

>You might have better luck with a database app that can produce customized reports.


I respect the perspective. Are you aware of whether Apple offers such a database app for iPhone? If so, I welcome your thoughts and questions thereregarding, including to the contrary. If not, I express gratitude and optimum goodwill for your thoughts thus far.

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.

How to conditionally group rows in Apple Numbers on iPhone?

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