6.11. CASE Function: Aggregating Results (Looker Studio Masterclass) (Google Data Studio Tutorial)

Поділитися
Вставка
  • Опубліковано 2 жов 2024

КОМЕНТАРІ • 7

  • @AndresLoboguerrero-w4i
    @AndresLoboguerrero-w4i Рік тому

    Hi Ahmad, great videos! For some reason Looker Studio is not presenting Grand Totals accurate in some of my tables. I have a teble with a Dimension named Channel (First user default channel group) and Total Users as metric can I use CASE function to get the result of the Total Users in a scorecard?

  •  Рік тому

    Hi Ahmad! Can we use "Where" in the formula to filter it? Or do we have to create a filter indeed? TY :)

  • @rachidaelhamdaoui3869
    @rachidaelhamdaoui3869 Рік тому

    doesn't work for me !

  • @Tostitos78
    @Tostitos78 Рік тому

    This is amazing. Do you think this method is still working? I'm trying to create a metric to count various events so that I don't need to filter for them specifically. I would like to display [specific event] vs total sessions over time. I'm adapted the formula you showed but instead of the sum I'm only getting 1. For example, I'm expecting 18 for cta_clicks but I get 1.
    SUM(
    CASE
    WHEN CONTAINS_TEXT(Event name,"cta_clicks")
    THEN 1
    ELSE 0
    END)

    • @siavashkanani
      @siavashkanani  Рік тому

      Try:
      SUM(
      CASE
      WHEN CONTAINS_TEXT(Event name,"cta_clicks")
      THEN Total_Events
      ELSE 0
      END)

    • @Tostitos78
      @Tostitos78 Рік тому

      @@siavashkanani I get the following error: Unknown dimension or metric id: Total_Events. Sorry I'm an absolute beginner with Looker Studio, so I might be missing something obvious. I tried without the underscore as well and nothing pops up.

    • @siavashkanani
      @siavashkanani  Рік тому

      You have to put the exact name of your Total Events field in there, what I wrote was an example. When you start typing the field name, you'll see a list of all fields and you can select it.