Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to apply filter to only show certain data in chart

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

2 Replies
Not applicable
Author

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

Gysbert_Wassenaar

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.


talk is cheap, supply exceeds demand