filter a foreign measurement

tatuspark
Participant IV
Hello, I have to create an array based on the values ​​of a filter on the field of a single view to calculate the measurements of 2 views.I made the join between the 2 views.When I calculate the measurements in the foreign view and apply the view filter. The filter has no influence on the foreign measurementhow could I solve this?thank you
 measure: sum_dig_total_ht {
label: "n"
type: sum
value_format_name: decimal_0
sql: CASE
WHEN {% condition date_filter %} CAST(${date_sales_date} AS TIMESTAMP) {% endcondition %}
THEN ${derived_table_digital_sales.total_ht}
END ;;
}

measure: sum_dig_total_ht_ly {
label: "n-1"
type: sum
value_format_name: decimal_0
sql: CASE
WHEN {% condition date_filter %} CAST(DATE_ADD(DATE(${date_sales_date}), INTERVAL 1 YEAR) AS TIMESTAMP) {% endcondition %}
THEN ${derived_table_digital_sales.total_ht}
END ;;
}
0 0 67
0 REPLIES 0
Top Labels in this Space
Top Solution Authors