Data Studio Tip: Convert Dimensions to Metrics

Google Data Studio lets you hook up a wide variety of data sources and create cool reports and visualizations out of them. Sometimes, though, the wires get crossed during the import process, and there's a data type issue where your metrics (numbers) get read as dimensions (text fields), and vice versa.

Luckily there's an easy, though manual, fix for this:

  1. Navigate to Resource > Manage added data sources
    data-studio-datatype-issue-img1
  2. Find the data source with the data type issue in the list and click Edit
    data-studio-datatype-issue-img2
  3. This will open up the full list of text and number fields available from that data source. Text fields are shaded green, while numbers are shaded blue. Find your field that has been recorded incorrectly, and change the data type from Text to Numeric, or vice versa. In this example, I'm taking a visitor count that was recorded as a dimension, and changing it from Text to Number.
    data-studio-datatype-issue-img3
  4.  Note that when you change the data type, the color may not automatically change.
    data-studio-datatype-issue-img4

    To address this, open the drop-down menu and select an aggregate function for your number. This aggregate function can be 'None', meaning it will make no change to your data at all. Once you complete this, the field will switch colors, indicating that Data Studio recognizes the new data type.
    data-studio-datatype-issue-img5

  5. Click 'Done' and you'll now see the dimension correctly recognized as a metric in Data Studio.

19 thoughts on “Data Studio Tip: Convert Dimensions to Metrics”

  1. GDS gets the data from Sheets originally as text, than I changed it manualy to numeric->number and change agregation for SUM so it changes collor to blue but still got the info "no data" in dashboard. However in different Sheet with the same structure everything is working fine.

    • I see, I don't think this is related to data type then, since GDS is recognizing the data as numeric. For this kind of issue you just need to troubleshoot by simplifying your query as much as possible, and then adding back complexity step by step. One common cause of "no data" is filters, so I'd remove all filters and make sure you haven't set any Date Range Dimension. Also choose aggregation = NONE rather than SUM. If you're still having trouble you can send over a screenshot of your setup and I'll take a look.

      • What happens when you just leave it as text without applying any function? Does data come through then? I'm trying to understand whether the problem is that there's actually no data, or that there is data and it's just not recognized propertly.

  2. Not sure if this will help, but I had a similar problem in which my scorecards would not recognize data. Ended up needing to format the column from Currency to Number. After editing the data source, and bringing in the updated columns, the scorecard started recognizing the data.

  3. Hey Ana,
    Somehow the GDS isn't allowing me to edit the fields this week, I have worked on this earlier and there was no error then. What do you think?

    • I had the same issue and it pissed me off for 1hr.

      My issue was the data in my google sheets was formatting funky. So clear the formatting in your google sheet and then set your currency fields as a number in the google sheet, then change it to currency in data studio

  4. Hmmm...not getting this to work. I've got a bunch of Google Analytics events that I'd like to put in a particular order, so I've used "case" to set an index value that represents which step in the process that event represents. (E.g. "Start" = 1) I've even wrapped it in a "cast(XX as number)" and it still won't change from a parameter to a metric.

  5. Hello all – just dropping my easy solution here after banging my head for a while.

    Simple wrap your desired metric as "SUM( )" in a calculated field and it will be recognized as a metric.

    For example, clicks would be "sum(Clicks)" while CTR would be "sum(Clicks)/sum(Impressions)".

    Hope this helps someone.

Comments are closed.