1 Reply Latest reply: Jul 13, 2011 7:07 AM by Miguel Angel Baeyens de Arce RSS

    set analysis - union

      Both the below expressions are working for me while trying to filter some records in a straight table.

       

      only({<[StartDate]={"<=$(vStartDate)"}>}[bkgno]) * only({<[EndDate]={">=$(vStartDate)"}>}[bkgno])

       

      only({<[StartDate]={"<=$(vEndDate)"}>}[bkgno]) * only({<[EndDate]={">=$(vEndDate)"}>}[bkgno])

       

      I need to concatenate the results obtained through these two expression. I tried

      (only({<[StartDate]={"<=$(vStartDate)"}>}[bkgno]) * only({<[EndDate]={">=$(vStartDate)"}>}[bkgno])) +

      (only({<[StartDate]={"<=$(vEndDate)"}>}[bkgno]) * only({<[EndDate]={">=$(vEndDate)"}>}[bkgno]))

      but it is not working, I am not getting results as expected.

      Records with StartDate > vStartDate and those with EndDate < vEndDate is not getting displayed after using the union operator. 

       

      How to go forward for getting union of the above two separate results ?

        • Re: set analysis - union
          Miguel Angel Baeyens de Arce

          Hi,

           

          If you mean you want to see those values that match both set modifiers, I'd try the following

           

          (only({<[StartDate] = {"<=$(vStartDate)"} >} [bkgno]) * only({< [EndDate] = {">=$(vStartDate)"} >} [bkgno])) &
          (only({<[StartDate] = {"<=$(vEndDate)"} >} [bkgno]) * only({< [EndDate] = {">=$(vEndDate)"} >} [bkgno]))
          

           

          Using the "&" instead of the "+" to concatenate. Anyway it would be very helpful if you upload some sample data to see what you want to get.

           

          Hope that helps

           

          Miguel Angel Baeyens

          BI Consultant

          Comex Grupo Ibérica