Get Free Trial

how can i union data after using filter object? asked on April 13, 2017

i wanna get the result like resultC which is the union of resultA and resultB. Here the resultA and resultB is the result data after using setFilter method to the dataA and dataB? very appreciated for your respond.

4 answers

Iryna Kulchytska Iryna Kulchytska Flexmonster April 13, 2017

Hi Shenyi Su,
Thank you for your question.
We have prepared the sample for you where setFilter method is used for two different fields “Category” and “Country” in one pivot table.
Both filters are applied to the data in the resulting pivot table.
Please let us know if this sample answers your question.
Kind regards,

Public April 14, 2017

Hi Iryna
Thanks for your answer. your solution is a great way to get the filtering data from two filter conditions, it seems like a intersection operation to the two filter condition, here the result data meets the filter condition 1 as well as the condition 2. but what i want the result is a union operation from the two filter condition,like  part of the filtering data may meet filter condition 1 but not condition 2 and other part of the filtering data may meet the filter condition 2 but not condition 1. does it make sense?
By the way, very appreciated for your answers.
Kind regards

Tanya Gryshko Tanya Gryshko Flexmonster April 14, 2017

Hello Shenyi,
Thank you for the additional details. We would like to explain how flexmonster.setFilter() method works. It allows defining which of hierarchy’s members will be shown on the grid. The method filters the members, not the values, for the concrete hierarchy’s members. Thereby the union operation from the two filter conditions does not make sense as it will show the same results as the intersection. Should you have any additional questions – feel free to ask.

Public April 17, 2017

Hi Tanya,
I got it.thank you very much.

This question is now closed