4 Replies Latest reply: Dec 13, 2017 11:40 AM by Martin Baculik RSS

    Color Expression for daily price changes (actually, NOT)

    Raj Uprety



      I am trying to change the text color of 'Price' values that have NOT changed from the previous day in my table.


      Let's say a table looks like this:


      Store #   12/12/17  12/11/17   12/10/17 and so on for 30 days

        22           2.99         2.99          2.89     and so on

        23           1.88          1.78         1.78


      I want the 2.99 on 12/12 (since it didn't change from 12/11), and 1.78 on 12/11 (again, since it didn't change from 12/10) in red text.


      I am trying something like this in the text color expression of 'avg(Price) measure':


      If(avg(Price)=avg({<[UpdateDate.autoCalendar.Date]={"$(=UpdateDate.autoCalendar.Date-1)"}>} Price), red())


      It doesn't work. Note that I have a autoCalendar in my script that takes my dates and provides me with Date, Month, Year, Quarters etc, and I have been using my date field as UpdateDate.autoCalendar.Date!

      I have been using QlikSense for about 10 days now, but I think its pretty neat for many tasks!

      Thanks in advance!