Dashboard filter for ${field1} = ${field2}

Knowledge Drop

Last tested: Aug 17, 2020
 

If you don't mind editing the model then here is a solution where setting the filter value to "Yes" will apply the filter rules, and setting it to anything else will just not do any filtering:

filter: apply_equality_filter { type: yesno sql: CASE WHEN {% parameter apply_equality_filter %} = true THEN ${field1} = ${field2} ELSE 1=1 END ;;}

This content is subject to limited support.                

Version history
Last update:
‎06-28-2021 11:46 AM
Updated by: