2 Replies Latest reply: Sep 23, 2017 5:04 AM by Amien Amien RSS

    double formulas in alternative measure

    Amien Amien

      I have this line chart:

      dim : Year,Week (not as alternative)

       

      in my measure i have this:

       

      Sum({$<[year]=,YearWeek=,MaxYear = {$(=Max(MaxYear)-1)},MaxYearLabel = {"$(=MaxYearLabel)"}>} [Sales])

      +

      Sum({$<[year]=,YearWeek=,MaxYear = {$(=Max(MaxYear)-0)},MaxYearLabel = {"$(=MaxYearLabel)"}>} [Sales])

       

      The result with be a line chart with two years. this works perfect because it's still 1 measure. Now i want to add an alternative measure:

       

      (

      Sum({$<[year]=,YearWeek=,MaxYear = {$(=Max(MaxYear)-1)},MaxYearLabel = {"$(=MaxYearLabel)"}>} [Sales])

      /

      Sum({$<[year]=,YearWeek=,MaxYear = {$(=Max(MaxYear)-1)},MaxYearLabel = {"$(=MaxYearLabel)"}>} [Visitors])

      )

      +

      (

      Sum({$<[year]=,YearWeek=,MaxYear = {$(=Max(MaxYear)-0)},MaxYearLabel = {"$(=MaxYearLabel)"}>} [Sales])

      /

      Sum({$<[year]=,YearWeek=,MaxYear = {$(=Max(MaxYear)-0)},MaxYearLabel = {"$(=MaxYearLabel)"}>} [Visitors])

      )


      Why this one doesn't work? Do i need to add something?


      I can't create two separate expression for this, because i want to use alternative measures.


      Thanks in advanced