Reference fields from a dimension group

Hi everyone!,

We are implementing the use of conditionally_filter in our explores to limit the size of sql when executed. The problem comes when we have to add all the data fields of that explore in the 'unless' parameter.

Example

conditionally_filter: {
filters: [sfv_opportunity.sfv_opt_date_request_date: "7 days"]

unless: [
sfv_opportunity.sfv_opt_date_request_day_of_week,
sfv_opportunity.sfv_opt_date_request_day_of_week_index,
sfv_opportunity.sfv_opt_date_request_day_of_month,
sfv_opportunity.sfv_opt_date_request_day_of_year,
sfv_opportunity.sfv_opt_date_request_week,
sfv_opportunity.sfv_opt_date_request_week_of_year,
sfv_opportunity.sfv_opt_date_request_month,
sfv_opportunity.sfv_opt_date_request_month_name,
sfv_opportunity.sfv_opt_date_request_month_num,
sfv_opportunity.sfv_opt_date_request_quarter,
sfv_opportunity.sfv_opt_date_request_year,

sfv_opportunity.sfv_opt_date_trip_date,
sfv_opportunity.sfv_opt_date_trip_day_of_week,
sfv_opportunity.sfv_opt_date_trip_day_of_week_index,
sfv_opportunity.sfv_opt_date_trip_day_of_month,
sfv_opportunity.sfv_opt_date_trip_day_of_year,
sfv_opportunity.sfv_opt_date_trip_week,
sfv_opportunity.sfv_opt_date_trip_week_of_year,
sfv_opportunity.sfv_opt_date_trip_month,
sfv_opportunity.sfv_opt_date_trip_month_name,
sfv_opportunity.sfv_opt_date_trip_month_num,
sfv_opportunity.sfv_opt_date_trip_quarter,
sfv_opportunity.sfv_opt_date_trip_year,
...
]

Is there any way to reference a dimension group without naming all the fields cointained in it? Something like:

unless: [
sfv_opportunity.sfv_opt_date_request_ *
sfv_opportunity.sfv_opt_date_trip_ * 
...
]

In some explores we have more than 10 types of dates, and each date has more than 5 timeframes.

Thanks in advance!

2 1 24
1 REPLY 1

If I'm reading this document right, you don't have to include the fields mentioned in the "filters" parameter in the "unless" parameter. So that can save you a little code! 

 

 
Beyond that, I'm pretty sure that "unless" accepts sets, so maybe it'd help to create a bunch of sets and reference those?

 

Top Labels in this Space