Looker Explorer/View/Measure union

aed1c4315f2c32c770801c207ea48057?size=40&default=https%3A%2F%2Fassets.zendesk.com%2Fimages%2F2016%2Fdefault-avatar-80.png&r=g

Amit24 Kumar

Aug 10, 2022, 6:40 AM PDT

I have created two views A and B, that I want to combine into a new view C.

In the views for A and B I have a lot of measures and dimensions and View A consist of data directly from database and view B having very specific ration calculation and based on the data filter and logic. So after designing both the view. We would like combine data into a final view to merge the result into a final view. I am not able to find any option available for union of data available at view level or explorer level. So could you please help on designing the solution for the same.

Problem Statement: calculation

Metric ID Measure Target Actual
312 Speed of Answer 60 70
213 Abandonment Rate 90 100
2 Aplha Metric ID-312/Metrci-213 Metric ID-312/Metrci-213


In view B, designed the calculated measures and dimensions as mentioned below and would like union with A view ( All columns, measures and dimensions names are same)

View B: calculated Measure example for Metric ID:2

measure: actual_hy {
type: number
sql: ${actual_hy_312}/${actual_hy_123} ;;
value_format: "#.00%;(#.00%)"

}
measure: actual_hy_312 {
type: sum
hidden: yes
sql: IF(${TABLE}.metric_id=312, ${TABLE}.actual_hy * ${TABLE}.dashboard_sign_multiplier, 1) ;;
}

measure: actual_hy_123 {
type: sum
hidden: yes
sql: IF(${TABLE}.metric_id=123, ${TABLE}.actual_hy * ${TABLE}.dashboard_sign_multiplier, 1) ;;


View A: Metric Id: 312 and 213 is coming from database.

measure: actual_hy {
type: number
sql: ${TABLE}.actual_hy;
value_format: "#.00%;(#.00%)"

}


Note: Need the solution union the result set into a new view for the business users.

Key points: We need create more than 100+ calculated view for the designing the solution.

0 0 467
0 REPLIES 0
Top Labels in this Space
Top Solution Authors