Skip to Content
0
Aug 23, 2023 at 02:38 PM

Sap analytics cloud - Derive date from version in data action script

100 Views

Hi all.

In a data action script I need to select both the version AND the date to set the scope of data I'll work with.

My versions IDs looks like as below :

2023_B0

2023_B1

2023_B2

2023_B3

2024_B0

...

image.png

As to say :

- 4 differents budgets per year ("B" in the ID means Budget, the last digit is the "version" of the version)

- the budget ID already contains the related year (with the 4 firsts digits, and using a property (type text)

I'm unsuccessfully trying to find a clever trick not to force my users to fill both version and date prompts.

When I try to use the year property of my version I get an "incompatibility type" error :

image.png

[d/Date] = NEXT(@i, "YEAR", [d/Version].[p/ANNEE])

("ANNEE" is "YEAR" in french)

While the line below is working fine :

[d/Date] = NEXT(@i, "YEAR", %date_dec%)

(because %date_dec% is a variable typed as a date)

Available types for properties are text, integer, decimal.

Any idea ?

Is there a way to cast a variable type (maybe text) to "date" ?

Thanks in advance & regards.

Guillaume P.

Attachments

image.png (7.8 kB)
image.png (3.2 kB)