2 Replies Latest reply: Sep 12, 2015 4:12 PM by Nelson Carmo Junior RSS

    Sense: Conditional colors with expression



      I have 2 Set analysis expression.


      One for this year = Sum({$<CalendarYear={$(=Max(CalendarYear))},EnglishProductCategoryName={"Bikes"}>}SalesAmount)


      One for preavious Year= Sum({$<CalendarYear={$(=Max(CalendarYear)-1)},EnglishProductCategoryName={"Bikes"}>}SalesAmount)


      I have made an KPI chart - Now i want to use conditional color.


      But have do i make it based on an expression saying if my number for this year is lower than last year, then red else if it is bigger then green.


      i tried like this:


      if(Sum({$<CalendarYear={$(=Max(CalendarYear))},EnglishProductCategoryName={"Bikes"}>}SalesAmount) > Sum({$<CalendarYear={$(=Max(CalendarYear)-1)},EnglishProductCategoryName={"Bikes"}>}SalesAmount), Green(),Red())


      But i dont know where to type it, or to make it work.