Filter manipulation

Hi, pls Is there a way a particular dimension field used as a filter and not a value in it can be made not to filter one measure example (Gross Earned Premium) and that same dimension filters another measure ( Net Earned Premium) that are both on the same table/tile visualization in looker.

Thanks for help

Hi Uche,

If the dimension in particular is relatively static (let’s say you have 2 sources of income: Online and Offline), you can easily accomplish this through LookML by creating a pre-filtered measure:

measure: sum_net_earned_premium_online {
    type: sum
    label: "Net Earned Premium (Online)"
    sql: ${net_earned_premium};;
    filters: [revenue_source: "Online"]
  }

This will create a case when statement in SQL and narrow the scope of this newly created measure to Online source only.

If you have dimensions that are more dynamic (like for example a list of country as source of income), then you might want to create a Merge Query, and apply the dashboard-level filter to only one of the 2 merged queries. Looker has tons of documentation and videos on how to do merge queries.

Hope this helps!

Thank You @jcdufault