examples/python/create_dashboard_filter.py
def main():
    """This file creates a new dashboard filter, and applies that filtering to all tiles on the dashboard.
    Dashboard elements listen on the same field that the dashboard filter is created from.
    This example can be modified to create a filter on many dashboards at once if you've added a new field to your LookML,
        dynamically generate dashboards, etc.
    """
    
    # Update these with the relevant information for the filter you want to create, and the dashboard
    dash_id = '<dashboard_id>'
    filter_name = '<name_of_filter>'
    filter_model = '<model_name>'
    filter_explore = '<explore_name>'
    filter_dimension = '<view_name.field_name>' # Requires a fully-scoped dimension
 
    filter = create_filter(dash_id, filter_name, filter_model, filter_explore, filter_dimension)
    elements = sdk.dashboard_dashboard_elements(dash_id)
    for element in elements:
        # Skip elements that are text tiles
        # Add other restrictions here to skip updating individual tiles
        if element.type != 'text':
            update_elements_filters(element, filter)
This file creates a new dashboard filter, and applies that filtering to all tiles on the dashboard.
    Dashboard elements listen on the same field that the dashboard filter is created from.
    This example can be modified to create a filter on many dashboards at once if you've added a new field to your LookML,
        dynamically generate dashboards, etc.
    
This file creates a new dashboard filter, and applies that filtering to all tiles on the dashboard.
Dashboard elements listen on the same field that the dashboard filter is created from.
This example can be modified to create a filter on many dashboards at once if you've added a new field to your LookML,
dynamically generate dashboards, etc.
This file creates a new dashboard filter and applies that filtering to all tiles on the dashboard . Dashboard elements listen on the same field that the dashboard filter is created from . This example can be modified to create a filter on many dashboards at once if you ' ve added a new field to your LookML dynamically generate dashboards etc .
def main():
    dash_id = '<dashboard_id>'
    filter_name = '<name_of_filter>'
    filter_model = '<model_name>'
    filter_explore = '<explore_name>'
    filter_dimension = '<view_name.field_name>' 
    filter = create_filter(dash_id, filter_name, filter_model, filter_explore, filter_dimension)
    elements = sdk.dashboard_dashboard_elements(dash_id)
    for element in elements:
        if element.type != 'text':
            update_elements_filters(element, filter)
def main ( ) : dash_id = '<dashboard_id>' filter_name = '<name_of_filter>' filter_model = '<model_name>' filter_explore = '<explore_name>' filter_dimension = '<view_name.field_name>' filter = create_filter ( dash_id , filter_name , filter_model , filter_explore , filter_dimension ) elements = sdk . dashboard_dashboard_elements ( dash_id ) for element in elements : if element . type != 'text' : update_elements_filters ( element , filter )
This file creates a new dashboard filter, and applies that filtering to all tiles on the dashboard.
This file creates a new dashboard filter and applies that filtering to all tiles on the dashboard .
"""This file creates a new dashboard filter, and applies that filtering to all tiles on the dashboard.
    Dashboard elements listen on the same field that the dashboard filter is created from.
    This example can be modified to create a filter on many dashboards at once if you've added a new field to your LookML,
        dynamically generate dashboards, etc.
    """ # Update these with the relevant information for the filter you want to create, and the dashboard # Requires a fully-scoped dimension # Skip elements that are text tiles # Add other restrictions here to skip updating individual tiles