1 Reply Latest reply: Feb 19, 2016 7:19 PM by PAUL YEO RSS

    How to comnine 2 different expression into 1 using if ?

    PAUL YEO

      Hi All

       

       

      I have expression for table 1 as below :-

       

       

      SUM({<year = {"$(=Max(year)-1)"},month={"<=$(=month)"},$(ColumnDim51)={$(ColumnDim51)}>}Amount*1)/1000

       

       

      When i Press on Button STep 1 , table 1 will display 1871.

       

       

      I have expression for table 2 as below :-

       

       

      sum({$<year = {$(=max(year)-1)}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}$(ColumnDim51)/$(Columndim89)/1000)

       

       

      When i Press on Button STep 2 , table 2 will display 1877.

       

       

      May i know how to combine above 2 expression into 1 ? So that when i press button step 1 it will display 1871 and when i press step 2 it will display 1877 in table 3.

       

       

      My imagine expression for table 3 is below :-

       

       

      =IF([[Pls select 66 Dim]] = 'rEVENUE',

      (

      SUM({<year = {"$(=Max(year)-1)"},month={"<=$(=month)"},$(ColumnDim51)={$(ColumnDim51)}>}Amount*1)/1000

      IF([[Pls select 66 Dim]] = 'sales',

      (

      sum({$<year = {$(=max(year)-1)}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}$(ColumnDim51)/$(Columndim89)/1000)

      ))

       

       

      But cannot work.

       

      next post i will send my QV Doc

       

      Paul