cancel
Showing results for 
Search instead for 
Did you mean: 

How to compare 2 Date fields in the same date dimension in SAC?

0 Kudos

Hi All,

I have a requirement where i have to compare the fields Apr 2021 and May 2021 in Dimension BOM_FROM in the example below. If these 2 are not the same Date, the result of April should be written up to May and the result of May should be written up to Dec.

Can anyone please suggest how to achieve the comparison of these dates within the same dimension?

I tried to use the DATEDIFF functionality but i think this is incorrect as i can only use this across 2 separate Time dimensions.

Any suggestions would be greatly appreciated

Result

MKreitlein
Active Contributor
0 Kudos

Hello Lavanya,

I did not do such things by myself, yet.

The only way I could imagine this to work is via a table, see:

https://help.sap.com/viewer/00f68c2e08b941f081002fd3691d86a7/release/en-US/77278faf3b3446b180d7ae9f5...

Feel free to post your solution if you found one.

BR, Martin

0 Kudos

Hi lavanya.roy,

"If you have two dates in the data prep phase you can create a calculated column with this formula: DATEDIFF([Date1],[Date2],"Day")" according to a previous post linked below.

Hope this helps!

From: https://answers.sap.com/questions/641352/creating-calculations-between-two-dates-in-sap-ana.html

Accepted Solutions (0)

Answers (0)