Search code examples
datedatetimeqlikviewqliksense

Show data based on selected date - QlikView


I have a list box of dates and a table which has datetime as dimension. The dates from list box is a separate table from that with complete date. I tried connecting them by cutting the datetime into just date (another field) in my select script but did not work. So I thought this should be done on the conditional of datetime dimension but I'm not sure how to do this. How should I be able to show data based on selected dates in Filters?

enter image description here


Solution

  • I would recomend two different approaches, recomending the first one :

    • On the LOAD script, along side loading the DateTime field, loading the same field again with only the Date part and use than one for filtering. Something like :

      LOAD
      <... some fields ...>
      DateTimeField,
      Date(Floor(DateTimeField)) as DateTimeFieldFilter
      <... some more fields...>
      
    • Add a field selector for you DateTime field, then to Properties, Field dropdown and choose the last option "Expression". On the Expression box enter Date(Floor(DateTimeField)).