Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
I have a bar chart with a calculated dimension based on the following logic to adjust a datetime column which is in UTC :
if(state='CA',time(myTimeColumn-8/24,'hh:mm'),
if(state='DC',time(myTimeColumn-5/24,'hh:mm'),
if(state='FL',time(myTimeColumn-5/24,'hh:mm'),
if(state='GA',time(myTimeColumn-5/24,'hh:mm'),
if(state='IL',time(myTimeColumn-6/24,'hh:mm'),
if(state='LA',time(myTimeColumn-6/24,'hh:mm'),
if(state='MA',time(myTimeColumn-5/24,'hh:mm'),
if(state='MI',time(myTimeColumn-5/24,'hh:mm'),
if(state='NY',time(myTimeColumn-5/24,'hh:mm'),
if(state='SC',time(myTimeColumn-5/24,'hh:mm'),
if(state='TN',time(myTimeColumn-6/24,'hh:mm'),
if(state='TX',time(myTimeColumn-6/24,'hh:mm'),
if(state='VA',time(myTimeColumn-5/24,'hh:mm'),
time(myTimeColumn,'hh:mm')
)))))))))))))
I would like to sort the X-axis of the bar chart in order of the adjusted time and cannot create this calculated field during data import as the state column and myTimeColumn are in two separate tables.
Adding this logic in the sort expression doesn't seem to make any difference, the x_axis doesn't seem to have any obvious sort order.
May be try this?
Match(state, 'CA', 'DC', 'FL', 'GA', 'IL', 'LA', 'MA', 'MI', 'NY', 'SC', 'TN', 'TX', 'VA')