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
1.9K members online now
1.9K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

using date range filter

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I have a large MySQL table. There are two fields that I use and both are DATETIME type. On Data Studio database connection both fields have DATE(YYYYMMDD). When using scorecard one field uses the date range dimension:

set ITEM_START_TIME as date range dimension

 

SELECT SUM(PAYMNT_AMOUNT) AS _PAYMNT_AMOUNT_ FROM analytics AS t0 WHERE (ITEM_START_TIME >= '20170418' AND ITEM_START_TIME <= '20170424') ORDER BY _PAYMNT_AMOUNT_ ASC

 

but the other field doesn't

set DATE_TRAN as date range dimension

 

SELECT DATE_TRAN, SUM(PAYMNT_AMOUNT) AS _PAYMNT_AMOUNT_ FROM analytics AS t0 GROUP BY DATE_TRAN ORDER BY _PAYMNT_AMOUNT_ ASC

 

What did I miss?

 

Thanks.