GSP361 challenge lab

Hi,

Did anyone completed first task in GSP361 challenge lab. total_gross_margin field is throwing error saying include the correct specification.

Please help if you got the solution

Regards,

Archana

0 2 684
2 REPLIES 2

Here are my codes:

  # TODO: Add dimensions and measures here
  dimension: is_search_source {
    type: yesno
    sql: ${users.traffic_source} = "Search" ;;
  }

  measure: sales_from_complete_search_users {
    type: sum
    sql: ${order_items.sale_price} ;;
    filters: [users.traffic_source: "Search", order_items.status: "Complete"]
    value_format_name: usd_0
  }

  measure: total_gross_margin {
    type: sum
    sql: ${order_items.sale_price} - ${products.cost} ;;
    value_format_name: usd_0
  }

  dimension: return_days {
    type: number
    sql: DATE_DIFF(${order_items.delivered_date}, ${order_items.returned_date}, DAY) ;;
  }

The subtasks are successful thus far.

However, I’m not able to cross the next task: Join the view to an Explore

My codes:

  join: order_items_challenge {
    type: left_outer
    sql_on: ${order_items.order_id} = ${order_items_challenge.order_item_id} ;;
    relationship: many_to_one
  }

The error message is: Please create a view to join order_items explore. Which means the new view created is not valid?

Would you share your solution here please? (so that we can explore further steps)

I have managed to complete this lab, but I think there's a bug in the last 5 minutes

See my solution: https://youtu.be/DP_oXW8MGcY

Build LookML Objects in Looker: Challenge Lab GSP361 solution

Top Labels in this Space
Top Solution Authors