We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Filter on values with top n not work

Answered
TWiRote asked on November 1, 2022

Hi
I use flexmonster connect to a data source using Flexmonster Data Server. I would like filter top 10 but it not work.
Thank you for your help.

4 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster November 1, 2022

Hello!
 
Thank you for contacting us.
 
Kindly note that the value filter requires the measure on which the top: 10 value filter will be applied:

rows:[{
        uniqueName: "PARTNER_COUNTRY_CODE",
        caption: "Partner",
        filter: {
                measure: {
                           uniqueName: "Quantity",
                           aggregation: "sum"
                },
                query: {
                        top: 10
                }
        }
}];

We have prepared a JSFiddle example for reference: https://jsfiddle.net/flexmonster/yh0gnsLk/.
 
You can find more details about filtering in our docs: https://www.flexmonster.com/api/filter-object/.
 
Please note that the members and query filter properties must not be used together, as they contradict each other. 
The members: [ "HS_NO.[92079000090]" ] would return only one row with the corresponding member, while the query: { top: 10 } would return ten rows.
 
We kindly suggest the following approach to make sure the filters or other parts of the report are configured correctly:

  1. Configure all necessary changes on the grid using Flexmonster UI.
  2. Save the report.json file by clicking 'Save' button on the Toolbar.
  3. Open the report.json file in any plain text editor(e.g., Notebook or Notepad) and find the already configured report object, which can be copied to your project.

 
Hope you will find our answer helpful.
Feel free to contact us if any other questions arise.
 
Regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster November 9, 2022

Hello!

Hope you are doing well.

Our team is wondering if you had some time to look through our previous answer.
Could you please let us know if you have any further questions about value filters?

Looking forward to hearing from you.

Kind regards,
Solomiia

Public
TWiRote November 10, 2022

Hi,
I've read your answer and it works fine when I connect my data to flexmonster data server but when i connect data to xmla it doesn't work Details are in the pictures I attached.
Thank you for your help.

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster November 10, 2022

Hello!
 
Thank you for your feedback.

We are glad to hear that everything works fine with the Data Server.
 
Kindly note that Flexmonster doesn't support the top value filtering feature for the Mondrian data source.
We also want to mention that new features and further improvements are no longer released for the Mondrian data source. However, we remain backward compatibility with the Mondrian data source.
 
Instead of Mondrian, our team suggests using Flexmonster Data Server.
 
Feel free to contact us in case of any other questions.
 
Regards,
Solomiia

Please login or Register to Submit Answer