7 Replies Latest reply: Jun 1, 2016 1:39 PM by Kandu Group RSS

    Date in variable

    Kandu Group

      Hi,

       

      I like to set up the KPI chart in my sense dashboard in the cloud so that it always show the figure of yesterday. When I hardcode the date it works but not in any other way

      I'm a newbie and appreciate any help...

       

      ----this is the one working----

      sum({$ <[EVENT_DATE]={"16-MAY-16 12.00.00"}>} TOTAL_DISCREPANCY_VALUE_OVER)

       

      So here is all the different methods I tried and failed.

       

      ----without variable----

      sum({$ <[EVENT_DATE]={"=$(=date(today()-13,'DD-MMM-YY hh.mm.ss'))"}>} TOTAL_DISCREPANCY_VALUE_OVER)

       

      ----without variable----

       

      LET v_date = date(today()-14,'DD/MM/YYYY');

       

      sum({1 <[Date(Date#(EVENT_DATE,'DD-MMM-YYYY hh.mm.ss'),'DD/MM/YYYY')]={$(=v_date)}>} TOTAL_DISCREPANCY_VALUE_OVER)

       

      ----without variable 2----

      LET v_date2 =date(today()-14,'DD-MMM-YY hh.mm.ss')


      sum({$ <[EVENT_DATE]={"$(=v_date2)"}>} TOTAL_DISCREPANCY_VALUE_OVER)

      sum({$ <[EVENT_DATE]={$(=v_date2)}>} TOTAL_DISCREPANCY_VALUE_OVER)