function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Matt BostromMatt Bostrom 

Is it possible for SAQL to load a dataset without specific global filters

I am using SAQL to get some percentages for the marketing team to show them converted leads and leads in stage 1, stage 2.

its working... however one of the formulas is to take the total leads qualified and divide that by the total leads created. this works until the user starts using the global filters and filtering on the Lead Status field.

is there a way to load a dataset into SAQL and ignore the global filters just for 1 metric in the SAQL? but apply the global filters to the other variable? the catch here is that we want to allow marketing to change the results based on lead create date (QTD, YTD, etc.) but we want to ignore the Lead Status filter they may have applied to the dashboard in the global filter.

SAQL code is below:
leads = load "Company_Leads"; qualified = filter leads by 'Status' == "Qualified" && 'IsConverted' == "false"; qualified = group qualified by all; qualified = foreach qualified generate count() as 'count_qualified'; leads = group leads by all; leads = foreach leads generate count() as 'count_all'; q = group leads by all full, qualified by all; q = foreach q generate sum(leads['count_all']) as 'count_all', sum(qualified['count_qualified']) as 'count_qualified'; q = foreach q generate coalesce('count_qualified' / 'count_all', 0) as 'sum_percent';