cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Use Date input control in a SAC formula to calculate date difference

adriano1973
Explorer
0 Likes
498

Hello everyone

I need an help about using a date set in a "Date input control" in a story filter, in a SAC formula

I have this Date input control

adriano1973_0-1738748559131.png

I have a model where is present a date dimension called StartingDate

What I need to do is calculate dinamically the day difference between StartingDate and the day set in the date input control.

How can I achieve this?

I tried with a formula calculation of type "Date difference" but I cannot select the date input control.

Anyone can help me?

Thank you so much

Kind regards 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

N1kh1l
Active Contributor
0 Likes

@adriano1973 

The Date Difference calculation only allows Date and Current Date/timestamp as the 2 date parameters. So currently this would not be possible. If starting date was a single date and not repeated for other dimensions you could have handled this in script but assuming starting date is tagged to data itself calculating the datediff betwen each record starting date and input control date selection would not be possible.

Nikhil

adriano1973
Explorer
0 Likes
Hello N1kh1l, apart date input control, is possible in a formula, to calculate a date difference, asking to the user to fill a date on the webpage to use as a "To date" in the formula? That is, is not possible any way to calculate a date difference having only a starting date, and getting the "To date" somewhere where the user can set it? Thank you