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

Creating Calculations between two dates in SAP Analytics Cloud

Former Member
14,454

Hello,

I am attempting to create calculations between two dates in SAC. SAC only allows one date dimension in the model so I am not able to compare the multiple dates and create calculations between the dates, without making direct modifications to the data set. It seems like we can't create calculations between dates in two seperate linked models either. If anyone knows how to create calculations between two dates in SAC, please share your knowledge.

Thanks.

Accepted Solutions (0)

Answers (6)

Answers (6)

Hi, This changed in a recent release. You can now have multiple dates in a model.

I have been using this with SuccessFactors data. The old solution was to split the date into Month/Day/Year and then use the year columns to calculate the date difference.

New issue since you can have multiple dates is how to type a specific date into a formula, no format seems to work. If you figure this out I would be super happy to hear.

Former Member

Hi Jessica

if you have two dates in the data prep phase you can create a calculated column with this formula:

DATEDIFF([Date1],[Date2],"Day")

If it's not a date you can look in my previous answer (there is a hyperlink)

The last part in the DATEDIFF formula can be replaced with "Month" or "Year"

Hopefully this will help a bit

/René

Former Member
kohesco
Active Contributor

in the latest release they speak of datediff formula

https://www.sapanalytics.cloud/product_updates/release-2018-16/

Former Member

but the datediff function won't work, as you can only import 1 dimension as a date

Subhasmit
Participant
0 Likes

Hi,

please go through to the link , I think it will be helpful for you .

https://blogs.sap.com/2020/10/31/date-calculations-in-sap-analytics-cloud-using-custom-date/

Thank You.

0 Likes

Good Morning.

I need to subtract two columns from the same KPI, from different years, and have the calculation persist when new years exist.

| 2020 | 2021 | total

-------------|----------|----------|---------

Sales | 235k | 200k | 35k

When the sales for the year 2022 come in, you want the calculation to remain.

How can I do?

Thank you!!

Erick