Skip to Content
avatar image
Former Member

Design Studio 1.6 excluding values from a dimension when the value is a variable

Hi there,

I have a question, is it possible to exclude values with .setFilter when the dimension and value are both variables?

Get the following error "Type "String" passed but "Boolean" expected for operator "!". Would somebody be kind enough to explain this?

Thanks in advance,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jun 13, 2017 at 03:10 AM

    Hi Ian,

    Yes, it is possible but for exclusions you need to use setFilterExt() instead of setFilter(). Here's an example:

    var myDim = "0WEEKDAY1";
    var myVal = "!2";
    DS_1.setFilterExt(myDim, myVal);

    The syntax for exclusions is shown in the help text below:



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 13, 2017 at 07:58 AM

    Hi Mustafa,

    Thanks for the response, unfortunately I think it's slightly more complex than I originally explained, maybe I can clarify slightly.

    I have created a dynamic chart view using an SDK called Graphomate, Graphomate has built in software that can run a custom event from its context menu, based on the value that you select from the chart. However, Graphomate needs to know which dimension it needs to select the value you have clicked on from, because the chart is dynamic I need a script that retrieves the dimension currently active in the data source (and the chart which is connected to it).

    The script below will add a filter to the DS_CHART based on what the user selects from the SDK chart view, I would like to allow them to be able to exclude a value using the same functionality but I'm not sure how as all of my variables are dynamic, where do I put the "!" in this script?

    var Dim_Array_Rows = DS_CHART.getDimensions(Axis.ROWS);
    var rows = "";
    Dim_Array_Rows.forEach(function(element, index) {
     rows =;
    DS_CHART.setFilterExt(rows, P1_GRAPHOMATECHART_1.getSelectedMember(rows));

    Thanks a lot for your help,


    Add comment
    10|10000 characters needed characters exceeded