Get Free Trial
Get Free Trial

How to group data Fields?

Answered
pietro brusato asked on October 15, 2019

Hi to all.
 
I know it has been asked several time but I’m quite new and not very technical. I subscribed for a trial and I’m testing flexmonster to look if it fits my need.
In this very moment my issue is about grouping data field only in the pop up component and naming the column.
My datasource is a csv and the dataset is about a survey like this
Grid image
1 – regarding grouping i have to groupe questions on a multilevel hierarchy so from the ui it will be possible to choose answers from a drop down menu
2 – regarding the naming I have a taxonomy file to convert the label of both questions and answer. Consider that I have both multiple and single answer.
I tried to read documentation and look into fiddles but I’m not able to understand how to solve.
Any help is much appreciated
 
 

11 answers

Public
Vera Didenko Flexmonster October 15, 2019

Hello, 
 
Thank you for writing to us.
 
Could you please explain more about what you would like to achieve?
In addition, screenshots and illustrations will greatly help us to understand your case better.
 
Waiting for your reply.
 
Best Regards,
Vera

Public
pietro brusato October 15, 2019

I’m just testing without anything really setted right now.
My organization has an ongoing survey updated monthly. What we would like to achieve is a tool like a pivot that allow final users to choose wihch dimension to look at row and column level. At the meantime we also need to build custom dimension to input as filter. Final user must use the ui to accomplish this task.
We have over 500 dimension (column) per each id (row). Dimensions has a hierarchy like

  • Category

          – Question
                – answer 1
                – answer 2
                 – answer 3
If I upload my csv I obtain  a flat list in the field list. I would like to see a grouped hierarchy like the one described above.
 
 

Public
Vera Didenko Flexmonster October 15, 2019

Hello, 
 
Thank you for providing more details about your use case.
 
We are glad to confirm that this is possible via the mapping property.
Please keep in mind that it is important to define all the CSV columns in the mapping property and they should be in the same order as defined in the CSV data. 
Here is a JSFiddle example for illustration: https://jsfiddle.net/flexmonster/j8vzLnm5/

For more information about JSON data types, please see the following guide: https://www.flexmonster.com/doc/data-types-in-json/
 
Please let us know if this helps.
 
Best Regards,
Vera

Public
pietro brusato October 16, 2019

Dear Vera,
 
thanks for the answer.
I’m working as you suggest but I noticed that if I add two field under one hierarchy only one per time is selectable. 
I’m following the fiddle you sahred.
Instead of 0 and 1 I would like to see the labal male and female.
 

Attachments:
Cattura.PNG

Public
Vera Didenko Flexmonster October 17, 2019

Hello, 
 
Thank you for the update.
 
1) About only one hierarchy member being selectable at a time:
Yes, you are right. This is because in the hierarchy it is possible to select the field (hierarchy level) from which to start displaying the hierarchy.
For a better understanding, please see the example when the hierarchy has more than two levels: https://jsfiddle.net/flexmonster/mwe6uh9s/
 
If you would like to display fields independently, it is possible to use dimensionUniqueName instead: https://jsfiddle.net/flexmonster/qyokpj45/
However, it is important to keep in mind that with dimensionUniqueName it is possible to define only one level.

Also, we suggest checking out the classic layout: https://jsfiddle.net/flexmonster/Lhgra3t8/
 
2) Regarding label names:

2.1) Could you please confirm that:
2.1.1) All of the columns that are in your CSV data are present in the mapping property
2.1.2) All the fields in the mapping property are placed in the same order as defined in your CSV data. 
In addition, it will greatly help us if you could provide a JSFiddle example (with JSON data) illustrating what you would like to achieve.
This will greatly help us to understand your case better.
 
2.2) It seems the desired output can also be achieved by defining a single field “Gender” containing the values “male” and “female”:  https://jsfiddle.net/flexmonster/hq8bL0ey/
 

Waiting for your reply.
 
 
Best Regards,
Vera

Public
pietro brusato October 17, 2019

Thanks for the answer.
regarding point 2, already solved
 
reagarding point 1 i try what you suggeste. Unfortunatly it wnat fits to my needs.
All the vairables I have in my qeuestionaire must be treated indiendently. If I want to show only male i need to have the ability to do that.
The tree views is usefull on my needs only to simplify the navigation of the available variables. I don’t want it to impact on the report.
I’m attaching a screenshot of another tool we use to analyse survey data. This is excactly what we want to achieve.
 
As you can see on the left we have all the variables. 
within the report we alredy drag and drop the age and we are doing the same with the male variables. 
Of course each variables could be placed on both row and column. I can decide to use only one per dimension or more
I hope this example will help.
 

Attachments:
Immagine1.png

Public
Vera Didenko Flexmonster October 18, 2019

Hello, 
 
Thank you for your response and for providing a screenshot for illustration.
 
 
We are glad to hear that you managed the solve the issue regarding label names.
 
 
As for the desired output:
1) You can filter the shown results via the setFilter() Flexmonster API call ( https://www.flexmonster.com/api/setfilter/ ), for example:

function showResultsForMale() {
pivot.setFilter("Gender", {
"members": [
"Gender.[male]"
]
});
}

function showResultsForFemale() {
pivot.setFilter("Gender", {
"members": [
"Gender.[female]"
]
});
}

function showResultsForAllGenders() {
pivot.setFilter("Gender", {});
}

2) Also, according to your screenshot, it seems the classic layout may be of interest.
To switch to the classic layout, specify the grid type in the options object:

options: {
grid: {
type: "classic"
}
}

 
3) In addition, you can use the dimensionUniqueName property to logically group your fields in the Field List.
 

Please see the following example where the above points are taken into account: https://jsfiddle.net/flexmonster/nkt0oepr/
 
 
You are welcome to contact us in case of questions.
 
 
Waiting for your feedback.
 
Best Regards,
Vera

Public
matcuoco October 29, 2019

Hello Vera, thank you for your kind cooperation.

I was wondering, if it would be possible to insert a new row in table without grouping with other row fields. For example, for the pivot with fields “Category” & “Color”, I want to add “Vehicle” after “Category”

Pivot “Standard”

  • Item
    • Car
      • Blue
      • Red
    • Bicycle
      • White
      • Black

Pivot “without grouping”

  • Item
    • Blue
    • Red
    • White
    • Black
    • Car
    • Bicycle

Let me know if you need further information,
 
Best Regards

Matteo

Public
Ian Sadovy Flexmonster October 30, 2019

Hello Matteo,
 
Thank you for the question.
Currently, that specific layout is not supported. It is possible to have only the members of one hierarchy on the same level.
 
Please let us know if you have any other questions.
 
Regards,
Ian

Public
pietro brusato November 4, 2019

Hello Ian,
thanks for the prompt replay. 
Does that specific layout will be supported in the future? 
If not, do you have and suggestion for a workaround? Flexmonster have everything we need but this feature that is the most relevant for us.
Many thanks in advance
P.

Public
Vera Didenko Flexmonster November 4, 2019

Hello, 
 
Thank you for your question.
 
Please kindly note that at the moment providing such a layout is not on our roadmap.
 
Currently, the only possible workaround is to combine the needed fields under one dimension (re-organize the data).
 
You are welcome to write to us in case of further questions.
 
Best Regards,
Vera

Please login or Register to Submit Answer