6 Replies Latest reply on Dec 6, 2016 7:30 AM by Timothé Le Vigouroux

    How to use true False statement depending on conditional statement?

    Timothé Le Vigouroux

      Hi,

       

      I am looking for help on how to use a case statement to condition boleans.

       

      I want to create a bolean in order to define wether a client has been visited according to following rule:

      Client that have a turnover up to 900000 should be visited at least once a month

      Client that have a turnover up to 100000 should be visited at least once for 2 months

      Client that have a turnover below 100000 should be visited at least once for 3 months

       

      Turnover (fact): Amount of turnover from transactions in regards to specific clients

      HistoryID (dimension): Meeting ID allow me to identified number of visit via a countD formula

       

      Here is how I turn it in order to have a bolean statement depending on turnover amount:

       

      Case sum([Turnover])

      When >= 900000 then COUNTD([Historyid])>= 12/ DATEPART('month',TODAY())

      When >= 100000 then COUNTD([Historyid])>= 6/ DATEPART('month',TODAY())

      When < 100000 then COUNTD([Historyid])>= 3/ DATEPART('month',TODAY())

      else COUNTD([Historyid])>= 3

      END

       

      My formula seems not to be valid (syntax issue). Would anyone could help me to correct my formula?

       

      Thanks a lot,

       

      Timothé