1 Reply Latest reply: Apr 16, 2018 3:40 PM by David Forest RSS

    Max YearMonth

    Mariam Ovasheli

      Hello,

      I want to Show last max month on line chart. but to have different Lines for three years.

      for dimension I use this:

      Dual(Date(date,'MMM D'),DayNumberOfYear(date)) AS YearDayNo

      and as meaasure This:

      sum({$<Year = {$(=max(Year))}, Month = {$(=max(Month))}>} FactSoldAmount)

      but it doesn't show me anything.

       

      can you Please tell me how can I show This different Three lines on chart for max month.

      I want something like this but only last Month

      line Chart.PNG

        • Re: Max YearMonth
          David Forest

          if your Month is not a number value, change to:

          sum({$<Year = {$(=max(Year))}, Month = {$(=Month(max(Month)))}>} FactSoldAmount)


          Set expressions tend not to honor the duality of a date field and will return the number when a numeric function is used.