Chart for Multiselect Fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • barbara_4fb
    Junior Member
    • Jul 2021
    • 9

    #1

    Chart for Multiselect Fields

    At the moment we are working on a statistic tool for a client where we show some charts on a dashboard via the advanced pack. However we found out that we can't use multiselect fields on charts as we cant't create matrix reports for them.

    Example:
    What types of food do you like? (Multiple answers possibile)

    As a result I would like a bar chart with the amount of answers for each question.

    Any idea how to solve that?
  • robin
    Junior Member
    • Aug 2025
    • 8

    #2
    I think I have found a solution to your problem, but its not exactly straightforward. Here is what I did:

    For each option in your multiselect-field i have created a integer field for the entity. In my examples i used the account entity with the field "type" which can have the values "Customer", "Partner" and "Investor".
    So I created the following integer fields for the account:
    - isInvestor
    - isCustomer
    - isPartner

    The default value should be 0 for all of them

    After that i created a workflow for the account entity, that triggers on updates and creations of accounts. In this workflow i execute the following formula script:
    Code:
    ifThenElse(type == 'Customer', cIsCustomer = 1, cIsCustomer = 0);
    ifThenElse(type == 'Investor', cIsInvestor = 1, cIsInvestor = 0);
    ifThenElse(type == 'Partner', cIsPartner = 1, cIsPartner = 0);
    So it basically sets the corresponding integer field to 1 for the selected type, and all other integer fields to 0

    Then I created a matrix report that looks like this:
    Click image for larger version  Name:	grafik.png Views:	0 Size:	54.9 KB ID:	123076

    The result look like this, which should be exactly what you wanted:
    Click image for larger version  Name:	grafik.png Views:	0 Size:	15.7 KB ID:	123077


    This solution is obviously quite high maintenance, since you do need to add a field to the entity in question, for every option in the multiselect field. And if these options change often, than you need to update the entitydefinition, the formulascript and the report everytime.

    However I think at this moment that that is your only option.

    Let me know if you need any more help with this solution

    Comment

    Working...