Forum Discussion

kmizuno's avatar
kmizuno
Qrew Trainee
20 days ago
Solved

How to group a report by individual values in a Multi-select Text field?

I have a Multi-select Text field on my Projects table called Project Products. A project can have multiple products, for example:

Product A; Product B; Product C

I’m trying to build a report that groups/counts by each individual product, but when I group by the multi-select field, Quickbase groups by the entire combination of selected values instead.

For example, I’m getting groups like:

Product A; Product B

Product A

Product B; Product C

Instead, I want the report to display:

Product A — 2 projects

Product B — 2 projects

Product C — 1 project

Is there a way to “explode” or separate the values from a Multi-select Text field so each individual product can be grouped and counted within one report?

  • re: "So for me to properly report I will need to do the same with my projects table and create that junction child table of project products?"

    Yes, somehow you will need to create that Child Table for Project Products.  You could use a Pipeline for example to create the children.  You would have to figure out what the trigger is for the pipeline to run, and it might have to trigger and delete the Project Products child record tables for that project and recreate them when it changes made elsewhere in the app.

     

3 Replies

Replies have been turned off for this discussion
  • The fundamental problem that you're up against is that on any report type or chart a particular Quick Base record can only appear once. So for example, imagine a pie chart, you can only have the project of fear appear once on that slice of pie. The same project cannot appear in multiple slices of the pie. 

    So one approaches to change from a down and dirty multi select field to a relationship where one project has many Products.  If you'd like, you can still roll up a summary field of the different products that are involved on a project so you can have them on a Table report up on the project level. But then you would run your reports down on the child table. The child table would likely be called something Project Products.

    He would set up a table of Products, and you already have your Projects table and then you would set up a new Many to Many join Table where one Project has many Project Products and one Product has many Project Products.

    Typically, you would then put an embedded report of the Products on your Projects Table.

    If you are unwilling to go through that change to the structure of your app, then your own alternative is to put a dynamic filter on the report for your multi select field and select them one by one to count the number of records on the report or see the number of records on some kind of summary report or pie chart.

    If you're interested in transitioning your data over to a "proper" child Table with the Project Products, and you need help, post back here and I can help you with any questions you have in building that child Table or populating it with your initial data from that multi select field.

     

     

     

  • kmizuno's avatar
    kmizuno
    Qrew Trainee

     

    Hi Mark, I appreciate the reply and help.

    The way I currently have it set up is that the Project Products field essentially pulls from the summary of products field we have on our contracts. So once a project is associated with a contract, it pulls the products that are listed on the contract from that summary field onto my multi-select project product field. (I originally just had the summary of contract products field on the project but had to create this because there are cases where products needed to be added to a project that are not on a contract, and a summary/lookup field doesnt allow for you to edit)

    For more context, I have a main 'Products and Services' table where my contract pulls its products from and my 'contract products' table is essentially that junction table to display contracted products on a contract. So for me to properly report I will need to do the same with my projects table and create that junction child table of project products?

    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

      re: "So for me to properly report I will need to do the same with my projects table and create that junction child table of project products?"

      Yes, somehow you will need to create that Child Table for Project Products.  You could use a Pipeline for example to create the children.  You would have to figure out what the trigger is for the pipeline to run, and it might have to trigger and delete the Project Products child record tables for that project and recreate them when it changes made elsewhere in the app.