How to Place one dimension in Filters and rows section

Answered
TEG asked on April 26, 2019

Hi,
We are using csv file connection for flexmonster cube, this is having Dimensions and Mesures.
For Example :
Dimensions are :  State,County and so on.
Metrics are : Count of People and so on.
Now i want to place state in Rows section as well as Filter section, both should present. How can i do this.
 
Thanks

4 answers

Public
Vera Didenko Vera Didenko Flexmonster April 26, 2019

Hello,
 
Thank you for your question.
 
A certain Dimension can be placed in the Rows section as well as the Filter section, and be present in both sections, by configuring the slice object the following way:
 
1) Specify the Dimension in the rows field.
2) Specify the Dimension in the reportFilters field.
 
As a result, the specified Dimension will be present both in the Rows and Report Filters sections.
 
Below is an example of how it is done.
The following will display "Color" in the Rows and Report Filters sections:

slice: {

// Specify Color in rows
rows: [
{uniqueName: "Color"},
{uniqueName: "[Measures]"}
],
columns: [
{uniqueName: "Country"}
],
measures: [
{uniqueName: "Price", aggregation: "sum"}
],

// Specify Color in reportFilters
reportFilters: [
{uniqueName: "Color"}
]
}

We have prepared a JSFiddle example for illustration.
 
Please let us know if this works for you and if you have further questions.
 
We are looking forward to hearing from you.
 
Best Regards,
Vera

Public
TEG April 29, 2019

Thank you for the response. 
I have tried with link which you have shared with me. First time it is working fine. 
When i removed color dimension from both the places and drag and drop the field again into the both places like report filters then Rows,it is applying for only rows section and removed from the Filter section.
I don't know which field client wants to place in report filter as well as Row.
So can you give me a sample which should work using drag and drop the fields.

Public
TEG April 30, 2019

is there any update?

Public
Vera Didenko Vera Didenko Flexmonster April 30, 2019

Hello,
 
Thank you for your reply.
 
Our Field List is designed to allow adding the field to one place only (either to rows/columns/report filters).
Please note that at the moment adding the same dimension to more than one section is only possible through configuring the slice object.
 
A workaround is to use API calls to provide a more dynamic approach (in case it is unknown which dimension needs to be added to both sections).
 
Here is a JSFiddle example: https://jsfiddle.net/flexmonster/8z3qfrwe/
 
In the provided example, a new "Add to Report Filters" item is added to the context menu for all hierarchies (with this particular slice, it is added for Color and Country cells).
When clicked, the selected field will be added to the report filters via the runQuery() API call after the current slice object is modified.
 
Please let us know if such a solution would work for you and if you have further questions.
 
Best Regards,
Vera

Please login or Register to Submit Answer