Switch between two measures defined in two different views

Hello,

I would like to give the users of my dashboard the opportunity to switch between two different measures that are defined in two different files.

Let’s say I have the following views and measure definition

view 1 : order_details

view: order_details {
  measure: total_orders {
    description: "The total number of orders."
    type: count
    sql: ${TABLE}.order_id ;;
  }
}

view 2 : sales_details

view: sales_details {
  measure: total_sales {
    description: "The total amount of sales."
    type: sum
    sql: ${TABLE}.sale_amount ;;
  }
}

They are joined in a Explore like so

explore: order_details{

  join: sales_details {
    type: left_outer
    sql_on: ${order_details.order_id} = ${sales_details.order_id}
  }

Is there way to use a parameter and liquid to switch between the total_orders and total_sales ? I am stuck here because I am not sure where to define this dynamic measure.

parameter: measure_type{
  type: unquoted
  allowed_value: {
    label: "Total Sales"
    value: "total_sales"
  }
  allowed_value: {
    label: "Total Order"
    value: "total_orders"
  }
}

Thank you !