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

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

Note

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"