title: Google Data Studio custom metric multiplying 2 parameters
body: <p>I am using Firebase for collecting events from my application.</p>
  
  <p>For example lets say I have an event print_attempt and it has 2 parameters page_count and copies. Something like this..</p>
  
  <pre><code>event {
     name: print_attempt
     param {
       name: copies
       int_value: 10
     }
     param {
       name: page_count
       int_value: 5
     }
   }
  </code></pre>
  
  <p>Now in Google Data Studio, I want to have a metric total page printed. How do I multiply 2 param values?</p>
  
  <pre><code>SUM(CASE WHEN Event Param Name = "page_count" THEN Event Param Value Int ELSE 0 END)
  </code></pre>
  
  <p>returns me the sum of page_count but in this scenario copies value is ignored.</p>
  
  <p>I tried following, but this gives me error.</p>
  
  <pre><code>SUM(CASE 
        WHEN Event Param Name = "page_count" THEN (
                Event Param Value Int * CASE WHEN EVENT PARAM NAME ="copies" THEN 
                Event Param Value Int ELSE 1 END) 
        ELSE 0 END)
  </code></pre>
  
  <p>Any pointers?</p>