2 Replies Latest reply on Jan 16, 2017 1:33 AM by Rahul Tokase

    Error adding hierarchy filter through javascript api on sample superstore example

    Rahul Tokase

      Hi

      I am using tableau 10.1

       

      For above problem I am referring to the sample Super store example comes by default with tableau desktop.

      In sample store I can see the following hierarchies are created in sheet.

      1) Product

           Category

           Sub-Category

           Manufacturer

           Product Name

       

      I have created a dashboard and embed successfully on my web application.

       

      Now I wanted to add the hierarchical filter using tableau Javascript API but getting following error. Can Anyone please help me how I can add the hierarchy filter using javascript api ?

       

      Code Use for applying the filter

      sheet.applyHierarchicalFilterAsync("[Product].[Category]", {

                              levels: [0, 1]

                          }, tableau.FilterUpdateType.ADD).then(function() {

                              deferred.resolve();

                          }, function(error) {

                              console.log(error);

                              deferred.resolve();

                          });

       

      Error after applying the filters.

      1. _innerException:null
      2. _message:"[Product].[Category]"
      3. tableauSoftwareErrorCode:"invalidFilterFieldName"
      4. __proto__:Object