AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

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

Bar Chart - Sorting Issue

Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

Am having an issue with the following;

 

Created a barchart based on Event Action - Unique Events

 

The event action is based on percentages completed

25%

50%

75%

100%

 

If I want to sort the table in this way based on the event action ascending it will show 100% on top and then show the other percentages in the right order. How can I make it sort in the way it should, ascending from 25% up to 100%?

 

Schermafbeelding 2017-07-17 om 14.37.03.png

It's no use either to sort based on unique events as it can differentiate between the percentages each week.

 

Re: Bar Chart - Sorting Issue

Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆

You can change the sort of your bar chart in the properties. You should be able to sort it by ascending rather than descending.

Bar sort.JPG

Bar Chart - Sorting Issue

[ Edited ]
Follower ✭ ✭ ☆
# 3
Follower ✭ ✭ ☆

Hi Litmon,

 

Yes I understand I can sort either on unique events or event name (ascending or descending). In the case of the example in the screenshot it will work but in another bar chart I have it won't work (see screenshots below where I've used all the different types of sorting but it won't sort it in the right way going from 25% to 50% to 75% to 100%)

 

The sorting options will either put 100% on first place as it start with a 1.

Or based on unique events it will not be in the right order as it's not a lineair thing with the data, i.e. there can be more people that go up to 75% than 100%.

 

For now the only fix I've found is to work with CASE formulas but it's not a very neat solution. The CASE formula I use is then CASE WHEN REGEXP_MATCH(event action, ".*25%.*") THEN "A; 25%" etc

 

Schermafbeelding 2017-07-18 om 10.38.53.pngSchermafbeelding 2017-07-18 om 10.41.42.pngSchermafbeelding 2017-07-18 om 10.42.03.pngSchermafbeelding 2017-07-18 om 10.42.11.png

 

Bar Chart - Sorting Issue

Participant ✭ ✭ ☆
# 4
Participant ✭ ✭ ☆

That's very strange. I wonder if, when Data Studio got the data from GA, it didn't assign it the right data type? Is it set up as a blue metric, number/percent? Normally you'd see the behavior above if it's reading it as a text value instead of a number.

Bar Chart - Sorting Issue

Follower ✭ ✭ ☆
# 5
Follower ✭ ✭ ☆

Well I was looking into this as well, as this was the way to solve it the previous time I had the issue.

 

The event action is labeled as a text value. Which is correct because the event action is usually just a label name like for example OpenImport. However in this instance the event action is a number instead of a text. If I would change it here though it would affect all my data using the "event action" dimension.

 

Bar Chart - Sorting Issue

Participant ✭ ✭ ☆
# 6
Participant ✭ ✭ ☆

Oy, yes, I see the difficulty. Maybe your best bet for now is the CASE formula then...