2 Replies Latest reply: Nov 14, 2017 2:03 PM by Zach Beauchemin RSS

    Getting Very Complex Expression to Ignore All Filters in Set Analysis

    Zach Beauchemin

      Hello, I am currently working on a difficult set analysis. Basically I want it to get the current YTD, but ignore all filters.

       

      Currently it is returning the correct YTD value but still responding when I select other filters(Ex. Value goes to zero when I select a prior year)

       

      See my current expression below:

       

      sum({1<YTDFlag={'1'}>}

        Aggr(

          if(ID=1,avg({1<YTDFlag={'1'}>}Field1),

            if(ID=2,

              (RangeSum(

                sum({1<YTDFlag={'1'}>}Field3),

                sum({1<YTDFlag={'1'}>}aggr(Sum({1<YTDFlag={'1'}>}Field5)*avg({1<YTDFlag={'1'}>}Field4), IndexB))

              )) * avg({1<YTDFlag={'1'}>}Field2)

              ,

              if(ID=3,

                if(

                  (RangeSum(

                    sum({1<YTDFlag={'1'}>}Field3),

                    sum({1<YTDFlag={'1'}>}

                      aggr(Sum({1<YTDFlag={'1'}>}Field5)*avg({1<YTDFlag={'1'}>}Field4)

                      , IndexB)

                    )

                  )

                  )

                  * avg({1<YTDFlag={'1'}>}Field2)<avg({1<YTDFlag={'1'}>}Field1)

                  , (RangeSum(sum({1<YTDFlag={'1'}>}Field3),

                    sum({1<YTDFlag={'1'}>}aggr(Sum({1<YTDFlag={'1'}>}Field5)*avg({1<YTDFlag={'1'}>}Field4),           

          IndexB)

                    )

                    )

                  ) * avg({1<YTDFlag={'1'}>}Field2),

                  avg({1<YTDFlag={'1'}>}Field1)

                  )

                )

              )

           )

        , IndexA )

      )