I've linked Google data studio with a MySQL database using the standard connector. Everything works except sorting correctly by date.
Database columns configured like this:
- price decimal(15,2) not null
24.59
- last_changed timestamp not null
2019-03-25 19:24:52
GDS datasource fields configured (as per this answer) like this:
- last_changed Date(YYYYMMDD)
2019-03-25
- sold_at GDS function
TODATE(last_changed, 'DEFAULT_DASH', '%Y%m%d')
GDS bar chart configured like this:
- time dimension sold_at as date
- dimension sold_at as date
- value metric price as sum
- sorting sold_at as date ascending
- time range auto from date picker with default set to current month
I am experiencing the following issue: When sorting is set to sold_at the bar chart is empty with the default date range. Only when i go back at least one month it displays values in the chart but also cuts off the last day so that its less than it should be. Only when sorting is set to price it displays everything correctly, even in the current month. Also when switching from sorting set to price to sold_at while the default time range is selected it shows the sold_at field under Invalid in the sorting modal.
I tried modifying the database column to datetime instead of timestamp but it didnt change anything. I also tried setting a different default time range but that doesnt change anything also. It keeps showing no data for 1 month back.
Any idea or someone who already stumbled across this scenario?