2 Replies Latest reply on Jan 12, 2017 7:07 AM by Dan Sanchez

    Issue with ATTR Funcntions

    Jilani Shaik



      i'm getting the following issue


      if attr(calculation)=true


      cust id


      where calculation= orderdate > parameter1 and orderdate < parameter2

      orderdate is from another data source


      but the above if condition is not valid can you please help me how to resolve

        • 1. Re: Issue with ATTR Funcntions
          Chris McClellan

          ATTR is usually used for dimensions, what happens when you remove the ATTR function ?

          • 2. Re: Issue with ATTR Funcntions
            Dan Sanchez

            Hi Jilani!


            Since you're using a dimension from a secondary data source and I'm guessing [Cust ID] is from your primary data source, you will need to aggregate all fields in your calculation.  You can use something like this:


            IF ATTR([Calculation]) = TRUE

                 THEN ATTR([Cust ID])



            You can also simplify the formula a bit more since the [Calculation] field just returns a boolean:


            IF ATTR([Calculation])

                 THEN ATTR([Cust ID])



            ATTR/MIN/MAX should all behave the same as long as there aren't multiple values being returned per row.  If there are multiple different values per row then ATTR will return back *. 


            Hope that helps!