2 Replies Latest reply on Feb 16, 2017 2:15 PM by mark walker

    Problem using IF statement across multiple datasources

    mark walker

      Having problems with aggregation across 2 data sources -  attempting to conditionally aggregate value based on the measure values in the primary datasource and 2 parameters, please see (workbook attached), need 'MTD NEW' to conditionally sum 'Valuehome' or COSTIT_RECOVERY from oas_docline(coda) or COSTIT based on year and period parameters and value in 'nominal name' and 'expenses nominals'. Have tried using ATTR in the calculated measure but yr and period calculation is returning zeros? Sources are blended on yr, period and cmpcode any workaround welcome

       

      MTD:

      if attr([Yr]) = [Year] and attr([Period]) = [Period No.] then [Value for Expenses] else 0 END

       

      Value for expenses:

      if ATTR([NOMINAL NAME]) = "Warehouse" and ATTR([Expenses Nominals]) = "Cost-it Recovery" then SUM([COSTIT - (DPMF10P)].[COSTIT_RECOVERY]) else SUM([Valuehome]) END

       

      Message was edited by: mark walker - data extract added..