Learn business growth with Google Analytics 4 Forums Google Analytics 4 Calculating Conversion Rate between Specific Event Names in Looker Studio with GA4 Data Reply To: Calculating Conversion Rate between Specific Event Names in Looker Studio with GA4 Data

  • Nguyen

    Member
    12 April 2023 at 4:29 am

    Your issue is occurring due to the problem when aggregating over both metrics and dimensions together. A Looker-based solution would be to create two different measures: one for the sum of ‘application’ events and one for the sum of ‘view’ events. You can do this by editing the code of the measures to be something similar to:
    SUM IF([Event Name] = 'application',[Event Count],0)
    and
    SUM IF([Event Name] = 'view',[Event Count],0)
    respectively.

    Then, you can calculate the ratio within LookML, using these two new measures and avoiding the issue of mixing aggregations. For example:
    [Application Sum] / [View Sum]
    Remember to handle cases where View Sum may be zero to avoid division by zero errors.

    This solution allows you to avoid creating calculated fields which mix metrics and dimensions, which Looker does not allow. It will calculate the ratios you need without the need for merging or blending multiple tables.