3 Replies Latest reply: Nov 10, 2017 2:21 AM by Shraddha Gajare

# How to get price

Hello All,

I need to pickup 31 st march average  price of each year ,what I mean is

for Fiscal year 2018 =31-03-2017 date price

Fiscal year 2019= 31-03-2018 date price

Fiscal year 2020= 31-03-2019 date price....

So on

Date Model:

My first question is linking by fiscal year will work or not ,if it ok when how write a expression to bring

If selected Fiscal Year =2018 then

LOGIC:

Previous fiscal year's(FY2017) --->max (SPrice_Calday's )(31-03-2017)----> Avg(Sprice_Price )

Kindly give suggestions on above requirement please

Thanks

• ###### Re: How to get price

Calculate YearEnd in your script as below

YearEnd(CALDAY,0,4) as YearEnd

In Expression, use

Avg( {<SPrice_Calday = {"\$(=max(YearEnd))"}>}Sprice_Price )

Here, On Selection of Year (2016-2017) it will give you Avg price of the day 31st March 2017

• ###### Re: How to get price

Hi,

Here, On Selection of Year (2016-2017) it will give you Avg price of the day 31st March 2017

I need 31st March 2017  price for the selection on fiscal year 2018(2017-2018)

• ###### Re: How to get price

Try,

Calculate YearStart in your script as below

YearStart(CALDAY,0,4) as YearStart

In Expression, use

Avg( {<SPrice_Calday = {"\$(=date(max(YearStart)-1,'DD-MM-YYYY'))"}>}Sprice_Price )