7 Replies Latest reply on Jul 15, 2016 9:42 PM by Ashish Chaudhari

    Conditional Sum (SUMIF) across multiple data sources

    Morten Blarke

      Hi Tableau,

       

      I am having problems understanding how to make a conditional sum across two data sources.

       

      DS1 contains Table that holds Date1 and Value

      DS2 contains Table that holds Date2

       

      I would like to create a calculated field that for each DS2 record sums Values from DS1 where Date2 >= Date1.

       

      I have tried this:

       

      if ATTR([DS2].[Date])>=ATTR([Date]) then sum([DS2].[Value]) else 0 END

       

      But resulting values are 0.

       

      Any hints?