Forum Discussion

kballar1's avatar
kballar1
Helper I
2 years ago

Days Between Two Dates Filtered by a Status

I have to create the difference between the physical date and the created on date, using the the "received pricing" status in the workflow status. 

I am needing to know how many days it took to get to that specific status("Received pricing" in the workflow status columns-which has multiple different status types). 

so basically how many days between physical date to created date with the filter "received pricing" in the workflow status column. 

Please advise.

 

3 Replies

  • Hi

     

    Try this as a measure :

     in text form :

    NBDays =
    var statusG=SELECTEDVALUE(Testdare[Status])
    return
    if(statusG="Received Pricing",DATEDIFF(SELECTEDVALUE(Testdare[createdon.date]),SELECTEDVALUE(Testdare[Physical Date]),DAY),0)
    • kballar1's avatar
      kballar1
      Helper I

      Hi,

       

      I put this code:

       

      NBDays =

      var statusG=SELECTEDVALUE(cr93f_cpsoo[Workflow Status])

      return

      if(statusG="Received Pricing",DATEDIFF(SELECTEDVALUE(cr93f_cpsoo[createdon.date]),SELECTEDVALUE(cr93f_cpsoo[Physical Date]),DAY),0)

       

      All the days just show as 0. Please advise.