4 Replies Latest reply: May 2, 2017 1:25 AM by Rahul Pawar RSS

    conditional count

    Agrim Sharma

      Hi,

      I want to count those values which are null from column “Role” and having interval difference(Today-Last Logon TimeStamp) more than 30 days

      I have:-

      In script-  IF(IsNull(Role), 'Active Account','Inactive Account') as "Active Account"

      &

      Formula-count(IF((Floor(Date(Today()) - Date([Last login Time], 'dd-mm-yyyy hh:mm:ss')))>29, 'DelayLogIn'))

      Data looks like below-

      Pre-W2KName

      Role

      Last Logon TimeStamp

       

       

       

      WSPtest2

      DISABLED\NO_PWDEXP

      31/03/2015 17:56

      WSPtest1

      NO_PWDEXP

      31/03/2015 17:48

      WSDS

      -

      wpivo40

      NO_PWDEXP\DELEGATE

      10/08/2015 16:28

      wpivo39

      -

      12/04/2017 12:31

      wpivo38

      NO_PWDEXP

      07/03/2017 15:27

       

      problem 2)

      I want to count those accounts whose password never expires “NO_PWDEXP” and

         

           ROLE

       

      DISABLED

      DISABLED\NO_PWDEXP

      DISABLED\NO_PWDEXP\NO_PWDREQD

      NO_PWDEXP

      NO_PWDEXP\ENCRYPT

      NO_PWDEXP\NO_PWDREQD

      NO_PWDEXP\SMART

      NO_PWDEXP\DELEGATE