I want to use conditional metric using AVG function and calculating a Score for two types of rows. In any case, it produces "no data" and no data is shown on any chart/table indeed.
I have rows that are either type = A or type = B. I need two metrics: Average Score A and Average Score B.
AVG(Score) returns correct results.
1. I tried AVG(IF(type = "A", Score, NULL)) and it produces No data.
2. I tried creating a dimension score_a defined as "IF(type = "A", Score, NULL)". Then I tried AVG(score_A). No Data.
3. I tried a time-consuming workaround - keeping AVG(Score) as a metric and applying a filter on each chart. Unfortunately, this makes them return "no data", too.
I specifically do not want to use AVG(IF(type = "A", Score, 0)) because that will mess up the result.
This has been experienced with score cards, tables, and bar charts.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |