

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
add years to a date value in set analysis
I need to add one year to the open date of each business unit in the set analysis
the following expression gives result yet the latter doesn't which I want
Please advise:
sum
(
{
<
H_Flag={'Sales'},
[Open Date]={"<=$(max(
{<
[AZ Year]={$(=max([AZ Year])-1)},
[AZ Week]={$(=max([AZ Week]))}
>}
[H_Transaction Date] ))"},
[Transaction Date] = {">= $(=min([Open Date]))"},
CloseDateLFL={">=$(min(
{<
[AZ Year]={$(=max([AZ Year])-1)},
[AZ Week]={$(=max([AZ Week]))}
>}
[H_Transaction Date] ))"}
>
}
[Sales Amount USD]
)
yet the following doesn't give any result
sum
(
{
<
H_Flag={'Sales'},
[Open Date]={"<=$(max(
{<
[AZ Year]={$(=max([AZ Year])-1)},
[AZ Week]={$(=max([AZ Week]))}
>}
[H_Transaction Date] ))"},
[Transaction Date] = {">= $(=AddYears(min([Open Date]),1))"},
CloseDateLFL={">=$(min(
{<
[AZ Year]={$(=max([AZ Year])-1)},
[AZ Week]={$(=max([AZ Week]))}
>}
[H_Transaction Date] ))"}
>
}
[Sales Amount USD]
)
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Ali,
Try using the following in order to add 1 year to a date:
[Transaction Date] = {">= $(=num(AddMonths(min([Open Date]),12)))"}
Hope this will let you get your desired results

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Ali,
Try using the following in order to add 1 year to a date:
[Transaction Date] = {">= $(=num(AddMonths(min([Open Date]),12)))"}
Hope this will let you get your desired results
