Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a data chart with one dimension of half-hours throughout the day, with a variety of expressions for each. How do I limit or filter based on the half-hours? the chart shows 12:00 AM through 11:30 PM, but I want to auto filter (via expression or other method) to only show everything after 6:00am, with no selection needed by the user. How can this be done? Thanks
you can round off the half-hours field to its nearest value as:
TIME(ROUND(time field,'00:30'),'hh:mm') AS new_time_field
One way is to use a set analysis expression. Suppose your chart now has an expression sum(Amount). If your time field is named MyTimeField and it contains numeric values (that is num(MyTimeField) returns a number). Then you can modify your expression to sum({<MyTimeField={'>0.25'}>}Amount. The chart will then show only times larger than 6 AM.
You could also use a calculated dimension: aggr(If(MyTimeField>0.25,MyTimeField),MyTimeField). You'll want to enable Suppress When Value Is Null for that calculated dimension.