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:
- Navigate to Resource > Manage added data sources
- Find the data source with the data type issue in the list and click Edit
- 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.
- Note that when you change the data type, the color may not automatically change.
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.
- 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”
it does not change anything.
Still seems to work for me. Was your original data numeric?
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.
Done all of that and it didnt help. Fields automatically recognized as metric works fine, but all changed manually are still "no data". Here is link to the problem with screenshots. https://support.google.com/datastudio/thread/6892689?hl=en
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.
No, than it shows "no data".I think it is problem with recognizing them.
I just recalculated the problematic fields inside GDS, thanks for help!
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.
Thank you for the tip!
Fantastic, thanks so much. You've saved me a ton of headache.
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'm not sure exactly what you're seeing but maybe it's related to these recent changes that were made to how dimensions and metrics work?https://support.google.com/datastudio/answer/9518554
This still hasn't fixed it. Recognizing numerc values as dimensions still :/
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
still not working
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.
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.
Thank you for sharing!
Comments are closed.