1

How to get # of days between given two dates

Hi,

How to calculate data difference by using formulas. 

Need # days between 2 dates such as "Request Date" was available in source and "Today date". 

Example :- Expected Results as below

RequestDate      TodayDate        # Days Difference

  2019-10-18        2019-10-23      5

  2019-10-19        2019-10-23      4  

 2019-10- 15        2019-10-23      8

 

Note:- My Data Source type is Direct Query

1 reply

null
    • "making the sophisticated simple"
    • AviPerez
    • 5 yrs ago
    • Reported - view

    You need to use the "datediff" common library function. Create a custom measure formula in Formulate. I would swap to script mode. It will look something like this

    datediff( [transactions].[Request Dates].caption, [transactions].[TodayDate].caption,"dy")

Content aside

  • Status Answered
  • 1 Likes
  • 5 yrs agoLast active
  • 1Replies
  • 62Views
  • 1 Following