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

First day of the month in SAP Analytics Cloud

raffuente
Explorer
0 Likes
1,384

Hello

I need to calculate the first day of the month in a data action in SAC. I see there is FIRST funcion but it seems to bring the first day of the year. I thought about using string functions but it seems it does not exist in SAC

Regards

Rafa

Accepted Solutions (1)

Accepted Solutions (1)

N1kh1l
Active Contributor
0 Likes

raffuente

Hello Rafa,

No straight SAC syntax to get the first day of every month dynamically but you can try a workaround using FOREACH, PREVIOUS() and DAY ().

I have answered a similar question below. See if it helps.

https://answers.sap.com/questions/13688184/foreach-monthly-on-a-daily-model-data-action-sac.html?sou...

Please upvote/accept if this helps.

Regards

Nikhil

raffuente
Explorer
0 Likes

Thanks it worked perfectly fine

Answers (1)

Answers (1)

ThomasK
Active Participant
0 Likes

Hi, in my case I had to aggregate data in model on daily level to monthly level. Worked with the following:

DATA([d/Date] = PERIOD([d/Date].[p/CALMONTH])) = RESULTLOOKUP()

Regards,

Thomas