Looks like you’ve done most of the heavy lifting already by writing the proper SQL!
I’m confused where the problem is. Your screenshot shows two columns, one with [object Object] and one with the correct value. Which one is “conv_date”?
Hey @ksure ! We have run into several issues with dates over the years, one of which I encountered earlier this year that gave me the result of [Object object] in my explores as well. Below are a couple of potential solutions that might work for you as well. Hopefully one does the trick!
I think you just need to cast the value from a string to a date:
dimension_group: date_str {
type: time
timeframes: [ raw, time, date, day_of_month, week, month, month_name, quarter, year ]
sql: cast(${TABLE}."DATE_STR" as date);;
You may also consider adding a “try_to” function to a dimension_group (I’d suggest creating a totally different dimension as a test):