1 Reply Latest reply on Sep 27, 2016 7:48 AM by Benjamin Greene

    Need help with calculated field

    Mary Brauch

      Looking to see if anyone can help me with this calculated field, I can't seem to get it to not error. It keeps saying a mix of aggregates and non aggregates. I believe it is because of the ones in red being aggregates even though I have all items after THEN as non-aggregates. I'm afraid I can't change them all to aggregates because then I'll have to add the ATTR() function in front of my dimensions (Activity Type, Status and I can't have an ATTR in a LOD. I need to fix at the work line id because there are multiple rows per work line id but need it to aggregate specifically at the work line id. I need to include Activity Type because it is not in my view. Any help will be appreciated, thanks in advance.



      { INCLUDE [Activity Type]:


          { FIXED [Work Line Id]:


      IF [Activity Type] = 'Action Item' THEN

                      IF SUM([Duration]) <= [On Time Target] THEN (IF [Status] = 'Completed' OR [Status] = 'Closed' THEN [Work Line Id] END) END

      ELSEIF [Activity Type] = 'InREACH'

                      OR [Activity Type] = 'DAL' THEN (IF [Status] = 'Completed' OR [Status] = 'Closed' THEN [Work Line Id] END)

      ELSE 0



        • 1. Re: Need help with calculated field
          Benjamin Greene

          I think a good place to start would be replacing SUM([Duration]) with {INCLUDE [Work Line Id] : SUM([Duration])}. LODs do not return aggregated values, so you can do something like this to get around that error. I'm not sure if Work Line Id is the granularity you are summing within, but that's what it sounds like reading your question. I hope this helps!