Dynamic Filter Generation

Comments

4 comments

  • Avatar
    Melissa Castilla

    I added this plugin to my Sisense but it doesn't seem to be working, any advice?
    Working in sisense Version 6.5.2.10062.

    this is the code I'm using in my config:


    // Define Elasticubes and Tables to add filters for
    prism.jaqlButler = {
    "BOM Tables": {
    scopedFilters: {},
    swapFilters: {
    "[Filterdates.perioddate (Calendar)]": [{
    "jaql": {
    "table": "Components",
    "column": "ToDate",
    "datatype": "datetime",
    "level": "days",
    "filter": {
    "to": 0
    }
    },
    "panel": "scope"
    }, {
    "jaql": {
    "table": "Components",
    "column": "FromDate",
    "datatype": "datetime",
    "level": "days",
    "filter": {
    "from": 0
    }
    },
    "panel": "scope"
    }]
    },
    segmentedFacts: {}
    }
    };

  • Avatar
    Alina Lotman

    Hi,

    The link to google drive is private - can you make it public?

    Thanks!

  • Avatar
    Oxana Noa Umansky

    Done. Enjoy Alina!

  • Avatar
    Pao Som

    I tried use case#1 with the following codes, but it did not work. Anyone has any idea? My sisense version is 6.7.1.13022. Thanks.

     

    // Define Elasticubes and Tables to add filters for
    prism.jaqlButler = {
    "swapFilterAdventureworks":{
    scopedFilters: {},
    swapFilters:{
    "[AllRotationType.rotationType]" : [{
    "jaql": {
    "table": "Dim_rotation",
    "column":"id",
    "datatype":"numeric",
    "filter": {
    "or": [{
    "attributes": {
    "table": "Dim_rotation",
    "column":"_rotation_type_filter1",
    "datatype": "text",
    "filter": {}
    }
    },
    {
    "attributes": {
    "table": "Dim_rotation",
    "column":"_rotation_type_filter2",
    "datatype": "text",
    "filter": {}
    }
    },
    {
    "attributes": {
    "table": "Dim_rotation",
    "column":"_rotation_type_filter3",
    "datatype": "text",
    "filter": {}
    }
    },
    {
    "attributes": {
    "table": "Dim_rotation",
    "column":"_rotation_type_filter4",
    "datatype": "text",
    "filter": {}
    }
    }
    ]
    }
    },
    "panel":"scope"
    }
    ],
    segmentedFacts:{}
    }
    };

     

    Below are my model and sample data

Please sign in to leave a comment.