Need a special offer?Find out if your project fits.
+

display percentage instead of count

Closed
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?

6 answers

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

Public
Eric Malalel November 9, 2022

you can close this old ticket

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster November 10, 2022

Hello, Eric!

Thank you for informing us.

Best regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster November 11, 2022

Hello, Eric!
 
Hope you are having a great week.

We decided to get back to you with a little update on this ticket.
Kindly note that now it is possible to calculate the percentage of users with percentofparentrowtotal aggregation instead of adding an extra Quantity column.
 
We have modified the previous example to illustrate the described approach: https://jsfiddle.net/flexmonster/o6g185v3/.
You can find a list of all built-in percentage aggregations by the link or try them using Flexmonster UI.
 
Hope you will find our answer helpful.
 
Regards,
Solomiia

Public
Eric Malalel November 24, 2022

Yes, this is perfect, thanks for feedback.
You can close this ticket.

Public
Maksym Diachenko Maksym Diachenko Flexmonster November 25, 2022

Hello, Eric!

Thank you for your response. We are happy to hear that our solution helped.
As always, feel free to contact us if other questions arise.

Kind regards,
Maksym

This question is now closed