2 Replies Latest reply: Jan 31, 2017 12:50 PM by Juna Sharma RSS

    Grand total for two measures

    Juna Sharma

      Hi all,

      I have two measures  order1 and order2 with the below formula in a table.

      How can display the sum of both measures(grand total) in another column?

      Order 1

      if(GetSelectedCount([Month])=0 and GetSelectedCount([Fiscal Year])=0 and GetSelectedCount(Req_GI_Date)=0 ,

      Sum({<calendar_current_month_offset={'$(vInventory)'},report_metric_key={'7'}, supply_orders_status_code = {'4','6'}>}ord_current_qty_base),

      if(GetSelectedCount([Month])=0 and GetSelectedCount([Fiscal Year])=0 and GetSelectedCount(Req_GI_Date)>0 ,

      sum({<calendar_current_month_offset={'$(vInventory)'},Req_GI_Date={'<=$(=vReq_GI_Date)'},report_metric_key={'7'},

      supply_orders_status_code = {'4','6'}>}ord_current_qty_base),

      if((GetSelectedCount([Month])>0 or GetSelectedCount([Fiscal Year])>0) and GetSelectedCount(Req_GI_Date)=0 ,

      sum({<calendar_year_month ={'$(=Max(calendar_year_month))'},report_metric_key={'7'}, supply_orders_status_code = {'4','6'}>}ord_current_qty_base),

      Sum({<calendar_year_month ={'$(=Max(calendar_year_month))'},Req_GI_Date={'<=$(=vReq_GI_Date)'},report_metric_key={'7'}, supply_orders_status_code = {'4','6'}>}ord_current_qty_base)

      )

      )

      )

       

      Order 2

      if(GetSelectedCount([Month])=0 and GetSelectedCount([Fiscal Year])=0 and GetSelectedCount(Req_GI_Date)=0 ,

      sum({<calendar_current_month_offset={'$(vInventory)'},report_metric_key={'7'},supply_orders_status_code = {'1','2','3'}>}ord_current_qty_base),

      if (GetSelectedCount([Month])=0 and GetSelectedCount([Fiscal Year])=0 and GetSelectedCount(Req_GI_Date)>0 ,

      sum( {<calendar_current_month_offset={'$(vInventory)'},Req_GI_Date={'<=$(=vReq_GI_Date)'},report_metric_key={'7'},

      supply_orders_status_code = {'1','2','3'}>}ord_current_qty_base),

      if((GetSelectedCount([Month])>0 or GetSelectedCount([Fiscal Year])>0) and GetSelectedCount(Req_GI_Date)=0 ,

      sum({<calendar_year_month ={'$(=Max(calendar_year_month))'},report_metric_key={'7'},

      supply_orders_status_code = {'1','2','3'}>}ord_current_qty_base),

      sum( {<calendar_year_month ={'$(=Max(calendar_year_month))'},Req_GI_Date={'<=$(=vReq_GI_Date)'},report_metric_key={'7'},

      supply_orders_status_code = {'1','2','3'}>}ord_current_qty_base)

      )

      )

      )

      Thanks

      Bhawana