Data Studio
2K members online now
2K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

New this week: Metrics in CASE; Available in Poland; Table improvements

Google Employee
# 1
Google Employee

Dear Data Studio fans;

 

Here's what's new in the product this week:

 

CASE statements in a calculated field are a useful tool for returning conditional values from your data. But until now, you could only evaluate and return dimensions in a basic CASE statement. Starting this week, you can compare metrics to literal values and return a metric. E.g. CASE WHEN Goal Completions > 1000 THEN 1 ELSE 0 END.

 

Learn more about CASE.

 

For users with more advanced needs, this article on creating more complex conditional metrics may be of interest.

 

We've added 3 new features to tables in reports:

  • The ability specify a secondary sort column 
  • The ability to set a target reference line for bar graph columns in a table. This is similar to the target feature of bullet charts.
  • Bar graphs in tables now display an X-axis. You can toggle this off or on.

Finally, we'd like to welcome users in Poland to the Data Studio family! Witamy!

1 Expert replyverified_user

New this week: Metrics in CASE; Available in Poland; Table improvements

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆

@Rick E  the article is not clear, does this conditional metrics works on aggregate data, for example  can i do something like metric x = sum(field a)/ sum(field b), and the result will change dynamically when i change a dimension in a chart.

 

Please tell me it is possible, that will fantastic!!!

New this week: Metrics in CASE; Available in Poland; Table improvements

Explorer ✭ ✭ ☆
# 3
Explorer ✭ ✭ ☆

sorry got too excited, anyway it is very good you are giving more options for metrics, and i hope you guys will work on some kind of "Calculated Metrics"  Excellent works 

New this week: Metrics in CASE; Available in Poland; Table improvements

Google Employee
# 4
Google Employee

Hi Momoune,

 

We already support calculated metrics. You can do what you want if field A and field B aren't aggregated (if they are, and you can change their Aggregation to None), the formula you have will work.

 

The issue, as you observed in your previous message, is trying to do calculations on already aggregated metrics. If your data is coming from a pre-aggregated data source, such as GA or AdWords, you're out of luck, because you can't access the raw data (Aggregation is locked to AUTO). But if it's not preaggregated (e.g. Sheets), the technique discussed in the conditional calculated fields article (https://support.google.com/datastudio/answer/7359285) discusses why, and offers a possible workaround.

 

Hope this helps!

 

Rick

 

 

 

New this week: Metrics in CASE; Available in Poland; Table improvements

Explorer ✭ ✭ ☆
# 5
Explorer ✭ ✭ ☆

@Rick E , I feel embarrassed Smiley Happy, it was easy i just changed to none and it works, I know it is still beta, but can you guys add more documentation, Blogs !!!

 

thanks again,