0 Replies Latest reply on Oct 12, 2018 12:46 PM by Eric Livingston

    applyFilterAsync doesn't change Measure Names filter

    Eric Livingston

      Using the applyFilterAsync method against any of my dimensions correctly filters my data based on the values provided to the function call. However, I've been having issues when trying to filter the measure names displayed in my data. Has anyone used the applyFilterAsync method to change the displayed measures?

       

      Here's the JS call from my extension:

      sheet.applyFilterAsync("Measure Names", ["Available"], tableau.FilterUpdateType.Replace, false);
      

       

      What I expect that call to do is take the current measure names filter and replace it with one where the only measure selected is "Available".

       

      Here's the JSON object that represents the measure names filter when only the "Available" value is selected:

      {
      "_worksheetName": "Table",
      "_fieldName": "Measure Names",
      "_filterType": "categorical",
      "_fieldId": "[sqlserver.42130.489168217595].[:Measure Names]",
      "_appliedValues": [{
      "_value": "[sqlserver.42130.489168217595].[sum:Available:qk]",
      "_formattedValue": "Available"
      }],
      "_isExcludeMode": false
      }
      

       

      When using the measure names filter card to make changes, the displayed measures are properly filtered, and calls to clearFilterAsync resets it to "All" and selects all measures as expected.