Enumeration: FilterOperator

Enum representing the filter operators for selecting specific data for component insights. Only data that meets the filter operator criteria is returned.

Usage 

1//JavaScript
2// Importing required modules and libraries from the Tableau Next Embedding SDK
3import {
4initializeAnalyticsSdk,
5AnalyticsDashboard,
6UnifiedFilterOperator} from '@salesforce/analytics-embedding-sdk';
7
8await initializeAnalyticsSdk({                  //Configuration object for initializing the Tableau Next Embedding SDK
9    authCredential: "<%- auth-credential %>",					//The frontdoor URL required for authentication
10    orgUrl: '<%- org-url %>'                    //The Salesforce org URL that hosts the Analytics component to embed.
11});
12
13const analyticsDashboard = new AnalyticsDashboard({
14    parentIdOrElement: '<%- parent-element %>',   		//The parent ID or element to render the component in
15    idOrApiName: '<%- dashboard-id-or-api-name %>'});    //The ID or API name of the component to embed
16
17analyticsDashboard.filters = {
18    fieldName: '<%- field-api-name %>',                        //Api name of the filter field
19    operator: UnifiedFilterOperator.<%filter-operator %>,
20    values: [<%- value %>],                                    //The value of the field on which the component is to be filtered based on the operator <%filter-operator %>
21    dataSource: '<%- datasource-api-name %>'
22};
23
24analyticsDashboard.render();                            //Renders the dashboard in the parent HTML element
1//TypeScript
2// Importing required modules and libraries from the Tableau Next Embedding SDK
3import {
4      AnalyticsDashboard,
5      initializeAnalyticsSdk,
6      FilterOperator,
7      type DashboardProps,
8      type AnalyticsSdkConfig
9} from '@salesforce/analytics-embedding-sdk';
10
11const config: AnalyticsSdkConfig = {					//Configuration object for initializing the Tableau Next Embedding SDK
12 authCredential: "<%- auth-credential %>",					//The frontdoor URL required for authentication
13 orgUrl: "<%- org-url %>"							//The Salesforce org URL that hosts the Analytics component to embed.
14};
15await initializeAnalyticsSdk(config);				//Initializes the Tableau Next Embedding SDK with the provided configuration and returns a promise that resolves on successful initialization.
16
17const dashboardProps: DashboardProps = {				//Defines the properties required for configuring a dashboard component.
18     parentIdOrElement: '<%- parent-element %>',   	//The parent ID or element to render the component in
19     idOrApiName: '<%- dashboard-id-or-api-name %>'   //The ID or API name of the component to embed
20};
21
22const analyticsDashboard: AnalyticsDashboard = new AnalyticsDashboard(dashboardProps);    //A web component for embedding an analytics dashboard
23
24analyticsDashboard.filters = [						//Sets filter property of the dashboard component to apply a filter on the embedded dashboard
25   {
26        dataSource: '<%- datasource-api-name %>',			//The Semantic Model API name of the field to be filtered
27        fieldName: '<%- semantic-model-api-name %>.<%- field-api-name %>',	//Api name of the Semantic Model that has the field and Api name of the filter field
28        values: ['<%- value %>'],											//The value of the field on which the component is to be filtered based on the operator <%filter-operator %>
29        operator: FilterOperator.<%filter-operator %>
30    }
31];
32
33analyticsDashboard.render();     //Renders the dashboard in the parent HTML element

NOTE: For Metric, current behavior: Equals gets translated to In and DoesNotEquals gets translated to NotIn operator.

Enumeration Members 

Between 

Between: "Between"


Contains 

Contains: "Contains"


ContainsIgnoreCase 

ContainsIgnoreCase: "ContainsIgnoreCase"


CurrentFiscalQuarter 

CurrentFiscalQuarter: "CurrentFiscalQuarter"


CurrentFiscalQuarterToDate 

CurrentFiscalQuarterToDate: "CurrentFiscalQuarterToDate"


CurrentFiscalYear 

CurrentFiscalYear: "CurrentFiscalYear"


CurrentFiscalYearToDate 

CurrentFiscalYearToDate: "CurrentFiscalYearToDate"


CurrentMonth 

CurrentMonth: "CurrentMonth"


CurrentMonthToDate 

CurrentMonthToDate: "CurrentMonthToDate"


CurrentQuarter 

CurrentQuarter: "CurrentQuarter"


CurrentQuarterToDate 

CurrentQuarterToDate: "CurrentQuarterToDate"


CurrentWeek 

CurrentWeek: "CurrentWeek"


CurrentYear 

CurrentYear: "CurrentYear"


CurrentYearToDate 

CurrentYearToDate: "CurrentYearToDate"


DoesNotEndWith 

DoesNotEndWith: "DoesNotEndWith"


DoesNotEndWithIgnoreCase 

DoesNotEndWithIgnoreCase: "DoesNotEndWithIgnoreCase"


DoesNotEquals 

DoesNotEquals: "DoesNotEquals"


DoesNotEqualsIgnoreCase 

DoesNotEqualsIgnoreCase: "DoesNotEqualsIgnoreCase"


DoesNotStartWith 

DoesNotStartWith: "DoesNotStartWith"


DoesNotStartWithIgnoreCase 

DoesNotStartWithIgnoreCase: "DoesNotStartWithIgnoreCase"


EndsWith 

EndsWith: "EndsWith"


EndsWithIgnoreCase 

EndsWithIgnoreCase: "EndsWithIgnoreCase"


Equals 

Equals: "Equals"


EqualsIgnoreCase 

EqualsIgnoreCase: "EqualsIgnoreCase"


GreaterThan 

GreaterThan: "GreaterThan"


GreaterThanOrEqualTo 

GreaterThanOrEqualTo: "GreaterThanOrEqualTo"


In 

In: "In"


IsEmpty 

IsEmpty: "IsEmpty"


IsNotEmpty 

IsNotEmpty: "IsNotEmpty"


IsNotNull 

IsNotNull: "IsNotNull"


IsNull 

IsNull: "IsNull"


LastNDays 

LastNDays: "LastNDays"


LessThan 

LessThan: "LessThan"


LessThanOrEqualTo 

LessThanOrEqualTo: "LessThanOrEqualTo"


NextFiscalQuarter 

NextFiscalQuarter: "NextFiscalQuarter"


NextFiscalYear 

NextFiscalYear: "NextFiscalYear"


NextMonth 

NextMonth: "NextMonth"


NextNDays 

NextNDays: "NextNDays"


NextQuarter 

NextQuarter: "NextQuarter"


NextWeek 

NextWeek: "NextWeek"


NextYear 

NextYear: "NextYear"


NotContains 

NotContains: "NotContains"


NotContainsIgnoreCase 

NotContainsIgnoreCase: "NotContainsIgnoreCase"


NotIn 

NotIn: "NotIn"


NotInValues 

NotInValues: "NotInValues"


PreviousFiscalQuarter 

PreviousFiscalQuarter: "PreviousFiscalQuarter"


PreviousFiscalQuarterToDate 

PreviousFiscalQuarterToDate: "PreviousFiscalQuarterToDate"


PreviousFiscalYear 

PreviousFiscalYear: "PreviousFiscalYear"


PreviousFiscalYearToDate 

PreviousFiscalYearToDate: "PreviousFiscalYearToDate"


PreviousMonth 

PreviousMonth: "PreviousMonth"


PreviousMonthToDate 

PreviousMonthToDate: "PreviousMonthToDate"


PreviousQuarter 

PreviousQuarter: "PreviousQuarter"


PreviousQuarterToDate 

PreviousQuarterToDate: "PreviousQuarterToDate"


PreviousWeek 

PreviousWeek: "PreviousWeek"


PreviousYear 

PreviousYear: "PreviousYear"


PreviousYearToDate 

PreviousYearToDate: "PreviousYearToDate"


StartsWith 

StartsWith: "StartsWith"


StartsWithIgnoreCase 

StartsWithIgnoreCase: "StartsWithIgnoreCase"


Tomorrow 

Tomorrow: "Tomorrow"


Values 

Values: "Values"


Yesterday 

Yesterday: "Yesterday"