Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

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

Capture.PNG

Date Model:

Capture1.PNG

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

3 Replies
shraddha_g
Partner - Master III
Partner - Master III

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

kunkumnaveen
Specialist
Specialist
Author

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)

shraddha_g
Partner - Master III
Partner - Master III

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 )