Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

display percentage instead of count

Answered
Eric Malalel asked on February 20, 2020

I use a FlexMonster component to display the status of users on a course. The status can be “not started”, “not satisfied” or “satisfied”.
I first set up the component as a table, than I switch to a pie graph with a segment for each status (see attached picture).
Rather than the count of users in each status, I would like to display the percentage of users in each status.
I have also attached the report definifion.
How can I do that?

1 answer

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster February 21, 2020

Hello, Eric,
 
Thank you for contacting us.
 
We would like to kindly inform you that percent aggregation can not be applied over the count aggregation. However, we would like to recommend using the following approach as a workaround:

  1. Add an additional auxiliary property to the object representing the user. Its value should reflect the number of users in the record. Due to the fact that the data set contains a unique object for each user, the value of the new property should be equal to 1. The structure has to be similar to the following:
     {
        Status: "Satisfied",
        Name: "Reno",
        Code: 123581321,
        Quantity: 1
     }
    
  2. Place the “Quantity” hierarchy in the slice and specify its aggregation as a percent.

 
Please check out an example we have prepared for you.
We hope it helps.
 
Please contact us in case of additional questions.
 
Best regards,
Illia

Please login or Register to Submit Answer