Custom Filters

Comments

50 comments

  • Avatar
    Joseph Peters

    This is great!  It would be very helpful if it was also possible to select multiple values.

  • Avatar
    Galin Nikolov

    Amazing, will be very useful, when we embeded widget and dashboard. One thing that can more useful is to be able to create filter (basicly request on elasticube) with the API.

  • Avatar
    Amy Scott

    This is a good feature, something to note though. If you add dependent filters on the right then this basic filter stops working, only good for single stand alone filters.

  • Avatar
    Mitchell Karp
    Good morning. Love it.
    If you have one filter widget above another, and you click on the top one, it displays improperly and hidden by the bottom one.  In the screen shot attached, I’m clicking on the top one:
    Also, it seems that it is it difficult to resize the widgets width.

     




    3D8F7137-2287-476C-981E-14E2617EF200.png
  • Avatar
    Doug Patterson

    Please consider adding the ability to do this with numeric filters too.  I've gone ahead and created a "tostring(int)" in my elasticube, but this plugin sorts alphabetically leaving me with:

    1

    11

    12

    13

    14

    15

    16

    17

    18

    19

    2

    20

    21

    etc....

     

  • Avatar
    Sergio Alvarez

    I have the same issue as Mitchell, can you help us fix this, because this widget its essential to our analysis,

    (If you have one filter widget above another, and you click on the top one, it displays improperly and hidden by the bottom one.)

    Best Regards

  • Avatar
    Leon

    I'm new to Sisense so forgive me if I am missing something, but I've been trying this and it is not working for me. I have extracted the zip file to a folder called plugins I created in  C:\Program Files\Sisense\PrismWeb\ 
    but no luck. The filter widget is not available. I have restarted the browser, and the machine in fact but the changes did not take place. Can someone suggest what might be going wrong please?

  • Avatar
    Michael Becker

    Hi Leon,

    welcome to SiSense:) Is you plugin in following path - C:\Program Files\Sisense\PrismWeb\plugins\filterwidget\ and files here(this is what you want and it should work), or have you extracted contents of filterwidget folder from zip file directly to plugins folder?

    Regards,

    Michał

  • Avatar
    Leon

    I originally had it in the \filterwidget\ folder and when I couldn't find it I removed that folder, but I've just put them back into it and I see it now! Thanks!!

  • Avatar
    Ido Darnell

    Thanks for that Leon,

    That is indeed an important note, when unzipping a file, the folder will hold an identically name folder inside itself, and thus the plugin will not be recognized.

    It is important to make sure you're placing a single parent folder in the plugins folder under that name.

    Also, the attached filter plugin shows the filter selections in a vertical view and not horizontal layout as the original, enabling a more comfortable view, as follows:

    vertical.PNG




    filterLabelsWidget.rar
  • Avatar
    Aviel Goh

    The improperly displayed filter issue that Mitchell and Sergio identified when one filter is sitting above another filter on the dashboard can be fixed by including the following code in the bottom of the widget.css file.

    widget[type='filterWidget'] widget-header {
        z-index: 0 !important;
    }

    Alternatively, you can download the file attached and replace the CSS file currently in your plugins C:\Program Files\Sisense\PrismWeb\plugins\filterWidget folder.

    Note that this fix only works for when the dashboard is in view mode and not design mode. 




    widget.css
  • Avatar
    Brian Bontrager

    For whatever reason the z-index workaround did not work for me.  However I noticed that when I go straight into a page in display mode the drop down stays on top as expected.  It is only design mode or if I switch modes that the upper widget goes behind the lower widget

  • Avatar
    John Wright

    Great plugin! Fixes another one of those usability things that was better in V4... Anybody that has use an html form before understands the contextual dropdown box better than a sidebar filter list.

    Now, I just wish it worked with Dates :-/ 

  • Avatar
    Jordan

    I couldn't get this functionality to remove the filter once it had been applied. The modified code below for the dropdown.js file accomplished that for me.

     

    setFilter: function() {

    // Create JAQL Filter
    var filter = {
    jaql: {
    column: this.metadata.column,
    table: this.metadata.table,
    dim: this.metadata.dim,
    datatype: this.metadata.datatype,
    level: this.metadata.level,
    title: this.metadata.title
    }
    };

    // Define the value
    var selectedVal;
    // What is the data type
    if (this.metadata.datatype === "datetime") {
    // Datetime field
    selectedVal = this.data;
    /*
    // Get the date mask
    var dimMask = this.widget.metadata.panel('items').itemsthisSeries.format.mask[this.metadata.level];
    // Get the filter object

    debugger
    if (this.metadata.level === "years") {
    // Create a date time obj for selected year
    selectedVal = new Date(parseInt(this.val),0,1);
    } else if (this.metadata.level === "quarters"){
    // Create a datetime obj for selected year-quarter
    selectedVal = new Date(2014,9,1);
    } else if (this.metadata.level === "months"){
    // Create a datetime obj for selected year-month
    selectedVal = new Date(2014,11,1);
    } else if (this.metadata.level === "days"){
    // Create a datetime obj for selected year-month-day
    selectedVal = new Date(2014,11,25);
    } else {
    return;
    }
    */
    } else {
    // value is a text field
    selectedVal = this.val;
    }
    // Set filter based on selection
    if (this.val === this.defaultClearSelection) {
    // Clearing the filter
    filter.jaql.filter = {
    all: true,
    explicit: false,
    multiSelection: true
    };
    // Create filter options when filter is 'unfiltered'
    var options = {
    save: true,
    //7.15.2016
    //Moved this to inside the defaultClearSelection check
    //Modified below to refresh when filter is set to default value
    refresh: true, //false,
    unionIfSameDimensionAndSameType:false
    };

    } else {
    // Selecting a specific member
    filter.jaql.filter = {
    members:[selectedVal],
    all: false
    };

    //7.15.2016
    //Moved this from outside the defaultClearSelection check to inside
    //This will fire if a selection is made
    // create filter options when selection is made
    var options = {
    save: true
    , refresh: false
    , unionIfSameDimensionAndSameType:false
    };
    }

    // Set via JavaScript API
    prism.activeDashboard.filters.update(filter,options);

    }

  • Avatar
    Chris

    Jordan, 

    Did you add that code to the file, or replace existing code. Also, if replaced, which section, or complete replacement? I am having the same issue and hope this will fix it for me. 

  • Avatar
    Jordan

    I added the modifications to the code in the file. Here is my dropdown.js file after the changes. You should be able to paste it into plugins->filterWidget and it take effect.




    dropdown.js
  • Avatar
    Chris

    Jordan,

    Thank you! Fixed the issue immediately. Appreciate the help and the fix!

  • Avatar
    Jordan

    Great. This is exactly why I posted the code, because I was sure someone could benefit from it. Be sure to post anything that you discover so as to expand the capability and utility of SiSense. We all benefit from it.

  • Avatar
    Jason Sweezey

    Is there a way to have the list always present, even though only a single value is selected?  So for example, I have a list of cities in the drop down.  I select Chicago, which sets my dashboard filters and the appropriate widgets update.  However, the dropdown would still show all the cities so you could jump immediately to another city without first selecting "no selection".

  • Avatar
    Jason Sweezey

    Never mind, I figured it out.  I de-selected the dashboard filter for the drop down.  Works great now.

  • Avatar
    Eric Zuehlke

    I am having 2 issues with the Filter Widget.  First, if you have more than one of these filters on a dashboard and you select one and then the other, the original list remains open.  Is there a way to have the dropdown close when you select something else on the page.  This becomes a big problem when you have one Filter right above the other.  They lay on top of each other and you can see parts of each one but neither look right.  Second, the Clear Selection function seems to have a bug.  If you click on the dropdown and choose one entry and then go to click on the dropdown again, the results only show the 'No Selection' option and the one you have chosen.  If you choose the 'No Selection' option, the Clear Selection option goes away but the data does not go back to unfiltered.

  • Avatar
    Malinda Jepsen

    I am using this on a dashboard that I'm displaying as my home page (using white labeling).  In IE, the entire dashboard does not render when I have this widget on it.  The home page does work in Chrome.  If I just display the dashboard (e.g. from the left hand menu), it does display in both IE and Chrome, but when I'm using it as my home page, it does not.

    Has anyone else had this issue and how did you resolve it?  Thanks in advance!

  • Avatar
    Takashi Binns

    Hi guys,

    Thanks for the feedback on this, I've incorporated many of your suggestions (listed in the notes section) into the latest version so feel free to download and try it out

    -Takashi

  • Avatar
    Louise Hines

    I am having a problem with this widget when using it with tabber. I have a tabber with 4 labels.  Depending on which label you click, you will either see 2 or 3 filters (these are all independent so the dashboard actually has 5 custom filters).  The problem that I am having is that whilst one row of filters will display correctly, the other row won't and at least one filter is pushed off of the screen. 

    Label A, and A Data drives one set of filters, and Label B and B Data drives the other set of filters.

    I attach two pictures.  The first shows the functionality as expected and the second shows where the custom filter is being pushed off screen (I've highlighted this as it's not terribly clear) when the other label is used.

  • Avatar
    Larry Craig

    Dependent filter functionality:

    While the widget is functional with dependent filter, the selected value isn't displayed within the widget itself after selection.  My use case requires dependent filters, and it would be great if the selected value was properly displayed in the widget.

  • Avatar
    Rob MacBride

    We could really use a 2nd (non-displayed/invisible) field to sort the drop-down items by.  For instance, we use drop-downs like Very High, High, Medium, Low, Very Low, etc. quite a bit, but they only sort alphabetically, not in the correct priority order. These tables typically do have a 2nd column with a numeric priority order (e.g. 0-7); we could even add a string column if necessary (e.g. A-H).  If we could use & display the 1st column for the filter, but sort by the 2nd column, this widget would be perfect!

  • Avatar
    Malinda Jepsen

    Takashi,

    Does this work in 6.6?  I added the plugin, restarted IIS and I still don't see Filter as a chart type.

    Malinda

  • Avatar
    Aviel Goh

    Also waiting on an update for 6.6.

  • Avatar
    Takashi Binns

    Hi guys,

    I've updated the plugin to work with version 6.6 as well as added in Rob's idea of using a separate field for sorting. 

    thanks!

    -Takashi

  • Avatar
    Michael Becker

    Hi Takashi,

    Thanks, it works now!

Please sign in to leave a comment.